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!

Update Records

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
GB
I'm using the script below to update a record when the page loads to indicate if the user is logged on and the time they logged on. but i keep getting error messages on the 'objComm.Execute()' line. Im using the same script in the Global.Asa to update a users status but this never works on logout.

Dim objComm
Set objComm = Server.CreateObject("ADODB.Command")

objComm.ActiveConnection = MM_connChat_STRING
objComm.CommandText="UPDATE Members SET LoggedIn = 'Yes', LastLoginDate = '" + Replace(LoginDate, "'", "''") + "'" "WHERE Username = '" + Replace(rsEdit__MMColParam, "'", "''") + "'"

objComm.Execute()
Set objComm = Nothing
 
Sometimes it works as it is but in Global.asa it doesn't work. I seem to get different error messages when i change the objComm.Execute()line. is that line line the correct syntax?

All the code works correctly when i use it on a network database connection but when i upload to a remote server i get some errors such as the global.asa not updating
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top