Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error (missing operator) in query expression

Status
Not open for further replies.

fang1122

MIS
May 31, 2001
1
US
how do i solve this one?? i've tried various approaches...

here is the error, followed by my code -


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error (missing operator) in query expression ''' Used = True'.

/IISSamples/submission4.asp, line 14




<% Option Explicit %>
<!- - #include file=&quot;adovbs.inc&quot; - ->

<%
Dim connect, Search, pin, adLockPessimistic
set connect = server.createobject(&quot;ADODB.Connection&quot;)
Set Search = server.createobject(&quot;ADODB.Recordset&quot;)
connect.open &quot;Guestbook&quot;
Search.Open &quot;SELECT PIN FROM entries WHERE Used = False&quot;, connect, adLockPessimistic

pin = Search(&quot;PIN&quot;)
Search.close

connect.execute &quot;UPDATE entries SET &quot; &_
&quot;Name='&quot; & request.form(&quot;Name&quot;) & &quot;', &quot; &_
&quot;Title='&quot; & request.form(&quot;Title&quot;) & &quot;', &quot; &_
&quot;Address1='&quot; & request.form(&quot;Address1&quot;) & &quot;', &quot; &_
&quot;Address2='&quot; & request.form(&quot;Address2&quot;) & &quot;', &quot; &_
&quot;State='&quot; & request.form(&quot;State&quot;) & &quot;', &quot; &_
&quot;City='&quot; & request.form(&quot;City&quot;) & &quot;', &quot; &_
&quot;Zip='&quot; & request.form(&quot;Zip&quot;) & &quot;', &quot; &_
&quot;Country='&quot; & request.form(&quot;Country&quot;) & &quot;', &quot; &_
&quot;Phone='&quot; & request.form(&quot;Phone&quot;) & &quot;', &quot; &_
&quot;Fax='&quot; & request.form(&quot;Fax&quot;) & &quot;', &quot; &_
&quot;email='&quot; & request.form(&quot;email&quot;) & &quot;', &quot; &_
&quot;Principal_Job='&quot; & request.form(&quot;Principal_Job&quot;) & &quot;', &quot; &_
&quot;Other_Principal_Job='&quot; & request.form(&quot;Other_Principal_Job&quot;) & &quot;', &quot; &_
&quot;Principal_Resp='&quot; & request.form(&quot;Principal_Resp&quot;) & &quot;', &quot; &_
&quot;Other_Principal_Resp='&quot; & request.form(&quot;Other_Principal_Resp&quot;) & &quot;', &quot; &_
&quot;No_Employees='&quot; & request.form(&quot;No_Employees&quot;) & &quot;', &quot; &_
&quot;No_Sites='&quot; & request.form(&quot;No_Sites&quot;) & &quot;', &quot; &_
&quot;Your_role='&quot; & request.form(&quot;Your_role&quot;) & &quot;', &quot; &_
&quot;Other_role='&quot; & request.form(&quot;Other_role&quot;) & &quot;', &quot; &_
&quot;Budget='&quot; & request.form(&quot;Budget&quot;) & &quot;', &quot; &_
&quot;Area_Interest='&quot; & request.form(&quot;Area_Interest&quot;) & &quot;', &quot; &_
&quot;Other_Area_Interest='&quot; & request.form(&quot;Other_Area_Interest&quot;) & &quot;', &quot; &_
&quot;Contact_Method='&quot; & request.form(&quot;Contact_Method&quot;) & &quot;' &quot; &_
&quot;Used = True WHERE PIN=&quot; & pin, connect, adLockPessimistic

Search.Open &quot;SELECT * FROM entries WHERE PIN=&quot; & pin, connect, adLockPessimistic
%>

i hope this all helps!
 
Look at this line

&quot;Contact_Method='&quot; & request.form(&quot;Contact_Method&quot;) & &quot;' &quot; &_
&quot;Used = True WHERE PIN=&quot; & pin, connect, adLockPessimistic

You're missing the , before Used.

hope this helps you out.
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top