OLE DB Provider for ODBC Drivers error '80040

Results 1 to 2 of 2

Thread: OLE DB Provider for ODBC Drivers error '80040

  1. #1
    Join Date
    Dec 1969

    Default OLE DB Provider for ODBC Drivers error '80040

    Hi Everybody,<BR><BR>I am trying to do simple update with the below code i dont understand it is giving wierd error like below.I am using access.Is there any problem if the field holds very large values which i accept from text area.<BR><BR><BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression &#039;&#039;&#060;I&#062;Anna and I&#060;/I&#062; is a complex love story set in Tel Aviv in the years between the Six-Day War and the Yom Kippur War. Daniel, a teacher, has moved from his village to Tel Aviv. Veering between reality and hallucination, he becomes increasingly disorientate&#039;. <BR><BR>/admin/catalogedit1.asp, line 116 <BR><BR>Code:<BR>_____<BR><BR>connstr=Application( "ConnectionString")<BR>Set objConn=Server.CreateObject<BR>"ADODB.Connection") <BR> objConn.open connstr<BR> <BR> sqlstr="update BookCatalog_tbl " & _<BR> "Set Author_name=&#039;" & Author_name & "&#039;," & _<BR> "Book_name =&#039;" & Book_name & "&#039;," & _<BR> "Publish =&#039;" & Publish & "&#039;," & _<BR> "Synopsis =&#039;" & Synopsis & "&#039;," & _<BR> "HAbout_Book =&#039;" & HAbout_Book & "&#039;," & _<BR> "About_Book =&#039;" & About_Book & "&#039;," & _<BR> "Genre =&#039;" & Genre & "&#039;," & _<BR> "Gender =" & Gender & "," & _<BR> "Subject =&#039;" & Subject & "&#039;," & _<BR> "Picture =&#039;" & Picture & "&#039; where auto_num=" & catID<BR> <BR> Response.Write sqlstr<BR> <BR> Set objComm=Server.CreateObject("ADODB.Command")<BR> With objComm<BR> .ActiveConnection=objConn<BR> .CommandText=sqlstr<BR> .CommandType=adCmdText<BR> .Execute , ,adExecuteNoRecords <BR> End With <BR> <BR> <BR> &#039;Release the Object Holded<BR> <BR> Set objComm=nothing<BR> objConn.Close()<BR> Set objConn=nothing <BR><BR>Any help is really helpfull,<BR><BR>With Regards<BR>Nagraj.A

  2. #2
    Join Date
    Dec 1969

    Default RE: OLE DB Provider for ODBC Drivers error '8

    Missing operator in query expression usually means that you have a single quotation mark embedded in one of the strings you&#039;re trying to insert. (Such as on the end of the word disorientate&#039;)<BR><BR>Use the replace function - Replace(Synopsis, "&#039;", "&#039;&#039;") The double apostrophe tells ADO that you are trying to insert an apostrophe and not delimiting text.

Posting Permissions

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