Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global.asa question

Status
Not open for further replies.

FieroFixer

Programmer
Nov 26, 2001
6
US
I'm trying to insert a date into a user table in an access database to log the last time the user visited the site. I'm doing this as part of a message board application I'm writing. Here's my code for the global.asa, can somebody tell me what I'm doing wrong?

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
sub application_onStart
end sub
sub application_onEnd
end sub
sub session_onStart
end sub
sub session_onEnd

dim connstr, objconn
connstr=&quot;PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=&quot;
connstr=connstr & server.mappath(&quot;bbwebdb/aspbboard.mdb&quot;& &quot;;&quot;

set objconn = server.createobject(&quot;ADODB.Connection&quot;)
objconn.open connstr
objconn.execute(&quot;UPDATE users SET userLastVisit = (#&quot;&now&&quot;#);&quot;)

objconn.close
set objconn = nothing
end sub
</SCRIPT>
 
Yes, NOW is a function, therefore should be...

objconn.execute(&quot;UPDATE users SET userLastVisit = (#&quot;&now()&&quot;#);&quot;)Hope this helpss...

G -GTM Solutions, Home of USITE-
-=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top