I'm trying to update a field in my database (SQL) using the following query:
Code:
set Conn=Server.CreateObject("ADODB.Connection")
set rsUpdate = server.CreateObject("ADODB.Recordset")
Conn.open "Driver={SQL Server}; Server=myserver;Database=StanEval;UID=xx;PWD=xx;"
set rsUpdate = conn.Execute "Update usertbl SET written_exam = '" & _ Trim(Request.Form("written_exam")) & "' " & _
" where user_ID = " & Request.Form("user_ID")
But I'm getting the following error:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/staneval/update.asp, line 74
set rsUpdate = conn.Execute "Update usertbl SET written_exam = '" & _ Trim(Request.Form("written_exam")) & "' " & _