DB update error

Results 1 to 3 of 3

Thread: DB update error

  1. #1
    Join Date
    Dec 1969

    Default DB update error

    Hi, I am attempting to update a record in a db and am getting an error. Please help! The code is: <BR><BR>&#060;% <BR>class_date = Replace(Request.Form("class_date"), "&#039;", "&#039;&#039;") <BR>row = CInt(Request.QueryString("row")) <BR>id = CStr(Request.Form("key")) <BR><BR>Set rs = Server.CreateObject("ADODB.Connection") <BR>*****rs.Open "DSN=drraw_db" <BR><BR>SQL="Update "&id&" SET date_class = &#039;"&class_date&"&#039; WHERE key = " & row <BR>*********************** ** <BR><BR>rs.Execute(SQL) <BR><BR>rs.Close <BR>Set rs = Nothing <BR>Response.Redirect "index.htm" <BR>%&#062; <BR><BR><BR>And the error message i am getting is: <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. <BR><BR>/admin/educ_dates_edit.asp, line 22 <BR><BR><BR>Thanks for the help! Cameron

  2. #2
    Join Date
    Dec 1969

    Default RE: DB update error

    Update TABLENAME set date_class = &#039;"&class_date&"&#039; WHERE key = " & id<BR><BR>hth<BR>Bastien

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default response.write SQL

    and show us the result<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts