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 August 3rd, 2006, 04:21 AM
Registered User
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update databse from global

I need to update a database table with the time the user logs out of my site/when their session ends.
I've been using a global.asa file with the following Session_OnEnd code, but it doesnt seem to be working for me........ can anybody help?

<script language=vbscript runat=server>
Sub Session_OnEnd
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=....."

query = "UPDATE User_LogTime SET Logout_Time = "now()" WHERE SID="&Session.SessionID&"

set conn = Nothing
End Sub

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to declare the global variable in global.asax? calyn_gately ASP.NET 3.5 Basics 0 August 6th, 2008 08:06 PM
dataset to databse update nashnash ASP.NET 1.0 and 1.1 Professional 1 December 10th, 2004 01:05 PM
Read-only Databse! fonsy2 Classic ASP Databases 5 December 15th, 2003 03:08 AM
UPDATE in Global.asa hoffmann Classic ASP Databases 5 November 14th, 2003 10:54 AM

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