Solved

Delete user from DB using Global.asa

Posted on 2001-08-23
1
177 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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now