Fatal Problem: Login/Logout

12/04/2012 20:13 diehard6#1
Hmmm....I've posted recently about some problems that weren't as critical and I was able to fix on my own. But this one is really a problem.

So...in the database [PS_UserData].[dbo].[UserMaster] there is the value: Leave. Supposedly: whenever you log into the client it is SUPPOSED to set the value to 1 and whenever you log out, it is SUPPOSED to set the value to 0.

My problem: It sets the value to 1 when the user logs in, but doesn't set it to 0 when they log out. So nobody is every able to log in more than once unless I go to the table and manually change the values every time.

I thought about making a script that auto excecuted every minute or so that sets all of them to 0, but then the problem is, none of my scripts would work because all of them involve the user being online (or have a value of 1).

Anyone know a solution? Is the column "Leave" the wrong name? Is there a problem with the client?

Thanks in advance guys ! :)
12/04/2012 20:16 nephren#2
Code:
UPDATE PS_UserData.dbo.Users_Master
SET LeaveDate = GETDATE()
WHERE UseQueue = 'False'  
UPDATE PS_UserData.dbo.Users_Master
SET Leave = 0
12/04/2012 21:49 diehard6#3
I wish that you would have read what I had said. I do appreciate the fact that you replied, but you really just wasted your time. I don't want to just set all of the values to 0 right now, or ever. I need the values to properly change between 1 and 0 when the user logs in/out for my scripts to function. Not to mention, I'd have to run this script every time someone logged in.
12/04/2012 21:55 JohnHeatz#4
I won't give you the direct answer will just point you to what has been pointed already. Stored Procedures, for log-in and log-out
12/04/2012 22:04 nephren#5
Nah, you waste our Time because there is a function called 'Search' - all the answers you need. This Questions has been asked some months ago.
But if you think, i waste your time, i won't give you answers anymore.
If you can't script your own Database how would you go 'live' ?
12/04/2012 22:50 diehard6#6
You don't think I've searched before? I've tried finding the answer to this problem multiple times. I've even tried a few of the fixes you are likely talking about. However, they haven't fixed the problem.
12/04/2012 23:10 Gotsome#7
sounds like a pretty simple problem, you should just have to run a Drop statement, DROP DATATBASE "your_database_name". that'll fix ya right up...... maybe
12/04/2012 23:11 nephren#8
Oh my God - 24 seconds ---- >[Only registered and activated users can see links. Click Here To Register...]

I don't think anything - I only believe in facts.

And from now on I won't respond anymore because this was a 24 Second search.
All the Questions you need are there - but no, we create a new thread...

Why ? <-- That is what I would like to ask.

People are lazy, didn't search right but saying something like: you waste your time.


EDIT:
Quote:
Msg 208, Level 16, State 6, Procedure usp_Try_GameLogin_Taiwan, Line 113
Invalid object name 'dbo.usp_Try_GameLogin_Taiwan'.
Add in the first line:
USE PS_UserData


Code:
USE PS_UserData
set ANSI_NULLS ON set Q.......
12/04/2012 23:13 diehard6#9
Thanks for the reply, again. I urge you to understand that I'm not being hostile, only trying to fix the problem. I really do appreciate you taking the time to help with this.

As I said, I've tried this fix several times before.

Every time I get this error:

Msg 208, Level 16, State 6, Procedure usp_Try_GameLogin_Taiwan, Line 113
Invalid object name 'dbo.usp_Try_GameLogin_Taiwan'.

@ JohnHeatz - I assumed that a stored procedure that was executed every time a user logged out would be an appropriate fix, however I wasn't sure how to accomplish this. Thanks so much for the reply :)
12/04/2012 23:53 JohnHeatz#10
Basically you are on the right track, you need to get what is executed by a log-out, and what the log-out triggers in order to create an UPDATE to the status of an account, by knowing these you will spot where the issue is
12/05/2012 01:21 diehard6#11
per:
Every time I log in now, the Leave is set to 0. It doesn't change to 1....=/
I need it to change to 1 in order for my scripts to work...right?
12/05/2012 02:01 [Sick]Syndicate#12
Quote:
Originally Posted by diehard6 View Post
per:
Every time I log in now, the Leave is set to 0. It doesn't change to 1....=/
I need it to change to 1 in order for my scripts to work...right?
Notice the admin panel will do this, I've had same issues before then i looked back into dashes scripts at the location of ps_userdata.dbo >Stored procedure >usp_Try_GameLogout_R there is something that make's the login then it turns your user status to -#.
12/05/2012 08:27 ShaiyaOmega#13
The easiest way to see what SP is executed is to Run SQL Profiler.
Run Profiler and Log Into the Server. That should show all Stored Procedures executed upon Login.
then do the same on Logout.
12/05/2012 12:09 Truth1010#14
Quote:
The easiest way to see what SP is executed is to Run SQL Profiler.
I think that's the best piece of advice anyone has given in a long long time. Not enough people use this tool to fix simple problems.