Syntax error in WHERE clause

Results 1 to 3 of 3

Thread: Syntax error in WHERE clause

  1. #1
    Join Date
    Dec 1969

    Default Syntax error in WHERE clause

    When submitting a form at my site, sometimes this error is returned:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in WHERE clause. <BR><BR>/av/checkout.asp, line 7 <BR><BR><BR>Can anyone tell me what the error refers to?

  2. #2
    Neil Popham Guest

    Default RE: Syntax error in WHERE clause

    not without your SQL statement. please provide

  3. #3
    stephen of new york Guest

    Default RE: Syntax error in WHERE clause

    without your sql statement i could only guess.<BR>solutions:<BR>1. maybe they are submitting a number and then you would have sent the wrong data type to the sql statement.<BR><BR>2. maybe they have included a /, &#039, "" or some other symbol that causes errors in the sql statement. in that case first you should create a function that&#039s going to treat their input into your form for all these things before putting it into the sql statement something like this <BR>function treatstring(userinput)<BR>userinput=replace(userin put, "&#039","`")<BR>userinput=replace(userinput,"/","-")<BR>userinput=replace(userinput,"""","") <BR>&#039i&#039m not sure how one would treat the quotation marks but i thik &#039they could cause errors. there are a couple more things to &#039treat.<BR>end function<BR><BR>i think this should fix it. but there is a whole study to treating strings okay that&#039s the best i could do without knowing more.<BR>stephen of new york<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