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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Update Query

Status
Not open for further replies.

Floodster

Technical User
Jan 28, 2005
204
Hi,
I am getting the error "Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression." when trying to execute an Update Query. My code is as follows;
<code>
sUser_Logname=Session("sess_User_logname")
sUser_ID=Session("sess_User_ID")
sUser_Logout=Now()
'lets stamp the date into the database when the user logged out.
ssSql="UPDATE tbl_LOGIN SET "
ssSql=ssSql & "user_id=" & CInt(sUser_ID) & ","
ssSql=ssSql & "user_logname=""" & sUser_Logname & ""","
ssSql=ssSql & "user_logout=#" & sUser_Logout & "#"
FnError("set columns")

FnError("set where clause")
ssSql=ssSql & " WHERE user_id = """& CInt(sUser_ID) & """ AND user_logout Is Null;"

</code>

I've left out the other bits as it has to be something in my SQL.
Any help much appreciated. If I've not covered it very well it's because I've written this as I'm leaving.
Thanks.
 
....SET user_id=0, .....
....WHERE user_id = "0"

strings and numbers...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top