Please define 'didnt work' what is your exact error, line number and the syntax on that line?
How do I get problematic SQL to work:
1..Comment out your execution line, response.write your statement and run the page.
2..Copy this syntax and paste it into the SQL window directley into Access. Does it work?
3..If not post the sql statement here indicating what data type the fields you use are EG:
us_userlastlogin = date/time
us_userid = text
Providing your two data types are as mentioned above, this should work:
objcon.execute "UPDATE users SET us_userlastlogin=#" & now() & "# WHERE us_userid='" & us_userid & "';"
- The semi colon at the end is not a error correction, just good practice.
- Is there a value in the variable us_userid?
If it still doesnt work place this where ever you place your functions:
IF isNull(varDate) OR Trim(varDate) = "" OR varDate = "Null" THEN
amDate = "Null"
amDate = "" & Month(DateValue(varDate)) & "/" & Day(DateValue(varDate)) & "/" & Year(DateValue(varDate)) & " " & TimeValue(varDate) & ""
And wrap it round your date value like so;
objcon.execute "UPDATE users SET us_userlastlogin=#" & amDate(now()) & "# WHERE us_userid='" & us_userid & "';"
This will insert a mm/dd/yyyy date type. What date type do you commonly use? Anyhow thats all I can think of. You need to post more specific errors.
Wind is your friend