?
Solved

Delete user from DB using Global.asa

Posted on 2001-08-23
1
Medium Priority
?
189 Views
Last Modified: 2010-05-18
Hi Everybody,

I got a DB that containd the online visitors of the site.
I am trying to delete a visitor from the DB, after he closes his browser.
I recognize the user by his IP.
Here is the code:

Sub Session_OnEnd

Session("LoggedIn")="Logged out"
Application.lock
Application("ActiveUsers") = Application("ActiveUsers") - 1
Application.unlock
SQL="DELETE * From Online Where IP='"&Request.ServerVariables("REMOTE_ADDR")&"'"
ConnOnline.Execute(SQL)

End Sub

I can see that the count of Application("ActiveUsers") is really -1.
But, the records are not being deleted from the DB.

Am I doing something wrong?

Thanks in advance for your help.

Best Regards, Tamar.
0
Comment
Question by:tamar111
1 Comment
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6830632
I will refund 50 points for this to you, and close it by moving it to the PAQ at zero points.

This is to advise you of all your open questions as of today, so you can update them and/or finalize them.

http://www.experts-exchange.com/jsp/qShow.jsp?qid=20172917
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20172926
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20172919
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20249406

Moondancer
EE Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question