?
Solved

Delete user from DB using Global.asa

Posted on 2001-08-23
1
Medium Priority
?
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 informatio…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

771 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