
July 27th, 2000, 11:42 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Problem with Update
<i><b>Originally posted by : ade (adrian@dublin.com)</b></i><br />I'm getting a sytax error when i try to update using the following code.<br />Any Ideas<br /><br /><%<br />adCmdText = 1<br />ElseIf Request.Querystring("Action") = "UPDATE" Then<br />strSQL ="UPDATE booking SET "<br />blnFirstParameter = True<br />If Len (Request.Querystring("orgName")) > 0 Then<br />strSQL = strSQL & "orgName='" &_<br />Cstr(Request.Querystring("orgName")) & "'"<br />blnFirstParameter = False<br />End If<br /><br /><br /> strconn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../source/database/archive.mdb") <br />set conn = server.createobject("adodb.connection") <br />conn.open strconn <br /><br /> Set objCmd = Server.CreateObject("ADODB.Command")<br /><br /> Set objCmd.ActiveConnection = conn<br /> objCmd.CommandText = strSQL<br /> objCmd.CommandType = adCmdText<br /><br /> 'Execute the command<br /> objCmd.Execute<br /> End if<br />%><br />
|