thanks guys i think this way we don't even need to bother to clear the session as we can update the SessionId to null
in the Session_OnEnd
i will give it a shot checking sessionId's and will let you know if i come across any other problems with this.once again thanks very much for all your help
still asking the same Q
we should permit only one login per username/password.
my thinking now is by going through your suggestion ,if some one else logged in with the same user name we should logoff the first user and allow the new user to login.
how can we do this..
steven what if the user opens two windows on the same machine and he still active with the first window.
i wanted to some how be able to do what the yahoo do with their messenger.If some one logs on another machine the first connection will be logged of.
how do we logoff the user and send him...
thanks tony
what about if some one logged in and then closes the browser(some times might crash and then closes itself also)
and again tried to logged in.we can't also rely Session to do the logout for us
and also my site doesn't have any logout functionality.
any other tip
Hi guys
what is the best way to prevent multiple users logging in
using the same username/password
--Can we guarantee this using the session
--Is it better to do storing the sessionid in the database
--any other thoughts would be great.
Thanks
Thanks for the reply vongrunt but i think to my knowledge though a beginner
by the time you use SELECT @BLAH = 1 + COALESCE(MAX(EmployeeId), 0) statement some one might have already insert a record in to Employee so that's the reason i wanted to use
INSERT INTO Employees(EmployeeId,)
SELECT...
Hello all,
i am Creating New EmployeeId in the Employees table using this statement.
BEGIN TRAN
INSERT INTO Employees(EmployeeId,)
SELECT 1 + COALESCE(MAX(EmployeeId), 0)
FROM EMPLOYEES
COMMIT TRAN
Is there any way i should store this newly created EmployeeId in a local variable so that...
thank you for your explonation
but i think we must always use transaction when you are trying to create newid using select max() statement as there is every chance that by the time you get your newid in the stored procedure another user might have created one more id.
so without using...
that's the point..i have not given permission to change the table so no other option..
do i need to use rollback if i use insert or update statements in that stored procedure..
another question is it alwasys advisable to use transactions if we are creating id's using select max()..
any...
thanks guys this should solve never thought about it..
but my table doesn't use identity(can't change that)on the fields so i need to go for
begin trans
select max(userid) and increment odd or even
commit trans
do i need to use rollback or not..
i hope the syntax i have given is correct..
Hi gurus
I have two tables
users(userid int,name varchar(50))
userclass(classid int,name varchar(50))
I want to make sure these two tables should never have same id's
Why i need this is i want to find whether a given id is actually a classid or just userid.
If it is a classid then i...
thanks dbomrrsm
good reasoning whether to go for temp table or not never thought this much about it.
I will point to this thread if any one in future raises question about temp table..
thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.