Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2006, 04:45 AM
Registered User
 
Join Date: Jun 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default BLOCK MULTIPLE LOGIN

hi,

i am using asp and sql server. i can stored login time,username,session id in database.how can i stored first user and disply message ie alert "already login,pls log another username".

how i can disply this message.
how i can block multiple same user name.

pls give me immediate reaction.

because i have try so much but i cant successful.


thank



 
Old July 24th, 2006, 11:43 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
Try with this method,
what you can do, first when user login just put a flag true in the same user database true,
if the same time anyone login, just check login flag true or flase, if it is true, you can give a error message. else success login.
When the user logout, you have to set flag flase everytime. if they did not logout, just clear flag afetr some hours.

surendran
(Anything is Possible)
 
Old July 24th, 2006, 11:54 PM
Registered User
 
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HI,
Thanks for given idea.

But i can used status in database.when user login then status is "Y" and logout then "N".

I try to block status in this query.

qq3 = "select LoginHistoryStatus = 'Y' From LoginHistory Where LoginHistorySessionID='"&Request.form ("name") & "'"
     'response.write qq3
     Set rs=con.Execute(qq3)
     If not rs.EOF then
     if LoginHistoryStatus = "Y" then
     Response.write "User r already Logged in"
     End if
     end if

Loginhistory is table name .but it cant work.so any problem pls slove this.

thanks

 
Old July 25th, 2006, 11:01 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

Hi,
Try with this code, But this is not going to check your user name correct or not,
after this if he login successfully, set LoginHistoryStatus ='Y' then only other user can not login same name.

qq3 = "select * From LoginHistory Where LoginHistorySessionID='"&Request.form
("name") & "' and LoginHistoryStatus = 'Y' "
Set rs=con.Execute(qq3)

if rs.RecordCount => 1 then
Response.write "User r already Logged in"
else
end if

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
RSA and multiple block encryption chadmichael BOOK: Beginning Cryptography with Java 8 June 5th, 2007 03:51 AM
Login multiple db ess100 ASP.NET 2.0 Professional 1 January 16th, 2007 08:18 AM
Multiple login sections, one site? lancer ASP.NET 2.0 Basics 0 December 5th, 2006 03:45 PM
Multiple ADO multiple user login Oracle9i jhay0721 Pro VB Databases 1 April 4th, 2005 11:23 AM
login to multiple web applications dhaywirex Classic ASP Professional 7 January 30th, 2004 05:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.