I replied earlier with two suggestions; perhaps there is a quote in the comments field or it could be blank.
Why don't you check for this in the code first to ensure that it doesn't blow up? What happens if the ID variable is invalid? Malc www.dragondrop.com -----Original Message----- From: Hohimer, Christopher J [mailto:[EMAIL PROTECTED]] Sent: 12 August 2002 20:47 To: ActiveServerPages Subject: help with an error Can someone help me with an SQL error? I get the following error: Microsoft VBScript compilation error '800a0400' Expected statement When using this code: set UpdateConn = Server.CreateObject("ADODB.Connection") MdbFilePath = Server.MapPath("NWIS.mdb") UpdateConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";" sqlstr = "update NWISUpdate set RequestStatus = 'Complete', Comments = '" & request.form("Comments") & "' where ID='" & request.form("id") & "'" UpdateConn.Execute(sqlstr) UpdateConn.Close set UpdateConn = nothing any help is appreciated. Thanks! --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
