Did you response.write the variables to see if they contain single quotes or
something that can blow the sql?

tom mallard
seattle.

-----Original Message-----
From: Hohimer, Christopher J [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:47 PM
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]

Reply via email to