Now I'm Getting......

Results 1 to 2 of 2

Thread: Now I'm Getting......

  1. #1
    Join Date
    Dec 1969

    Default Now I'm Getting......

    Well, I thought my problem was solved, but now I am getting the following error message:<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;Electronics&#039;. <BR><BR>Electronics is the first name in my multi-select listbox that was selected, but the error occurs on any selection that is selected first.<BR><BR>The line that it points to as having the error is:<BR><BR>conn.Execute ("INSERT INTO Users (category_id) values(" & arrSelectedCourses(I) & ")" <BR><BR>I&#039;ve looked the error message up at MS knowledgeBase, but I still don&#039;t see where it applies with my code:<BR><BR>;en-us;Q243834<BR><BR>Can anyone give me some insight on this?<BR>(Please see my previous threads for earlier details.)<BR><BR>Thanks.<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default You need ' around the..

    .. value.<BR><BR>And a link to your prior post would have been nice. I&#039;m not going to search it down.<BR><BR>But, try this code:<BR>conn.Execute ("INSERT INTO Users (category_id) values(&#039;" & arrSelectedCourses(I) & "&#039;)" <BR><BR>But, if the string contains a &#039;, you will have problems and need to handle it:<BR>conn.Execute ("INSERT INTO Users (category_id) values(&#039;" & Replace(arrSelectedCourses(I), "&#039;", "&#039;&#039;") & "&#039;)"

Posting Permissions

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