Solved

Delete user from DB using Global.asa

Posted on 2001-08-23
1
180 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
sql to convert to date IF entry is in date format 4 94
Bypass cross origin issues on development site 3 89
IP API - need data... 4 27
Select case on click 3 21
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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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