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="adovbs.inc" - ->
<%
Dim connect, Search, pin, adLockPessimistic
set connect = server.createobject("ADODB.Connection"
Set Search = server.createobject("ADODB.Recordset"
connect.open "Guestbook"
Search.Open "SELECT PIN FROM entries WHERE Used = False", connect, adLockPessimistic
pin = Search("PIN"
Search.close
connect.execute "UPDATE entries SET " &_
"Name='" & request.form("Name" & "', " &_
"Title='" & request.form("Title" & "', " &_
"Address1='" & request.form("Address1" & "', " &_
"Address2='" & request.form("Address2" & "', " &_
"State='" & request.form("State" & "', " &_
"City='" & request.form("City" & "', " &_
"Zip='" & request.form("Zip" & "', " &_
"Country='" & request.form("Country" & "', " &_
"Phone='" & request.form("Phone" & "', " &_
"Fax='" & request.form("Fax" & "', " &_
"email='" & request.form("email" & "', " &_
"Principal_Job='" & request.form("Principal_Job" & "', " &_
"Other_Principal_Job='" & request.form("Other_Principal_Job" & "', " &_
"Principal_Resp='" & request.form("Principal_Resp" & "', " &_
"Other_Principal_Resp='" & request.form("Other_Principal_Resp" & "', " &_
"No_Employees='" & request.form("No_Employees" & "', " &_
"No_Sites='" & request.form("No_Sites" & "', " &_
"Your_role='" & request.form("Your_role" & "', " &_
"Other_role='" & request.form("Other_role" & "', " &_
"Budget='" & request.form("Budget" & "', " &_
"Area_Interest='" & request.form("Area_Interest" & "', " &_
"Other_Area_Interest='" & request.form("Other_Area_Interest" & "', " &_
"Contact_Method='" & request.form("Contact_Method" & "' " &_
"Used = True WHERE PIN=" & pin, connect, adLockPessimistic
Search.Open "SELECT * FROM entries WHERE PIN=" & pin, connect, adLockPessimistic
%>
i hope this all helps!
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="adovbs.inc" - ->
<%
Dim connect, Search, pin, adLockPessimistic
set connect = server.createobject("ADODB.Connection"
Set Search = server.createobject("ADODB.Recordset"
connect.open "Guestbook"
Search.Open "SELECT PIN FROM entries WHERE Used = False", connect, adLockPessimistic
pin = Search("PIN"
Search.close
connect.execute "UPDATE entries SET " &_
"Name='" & request.form("Name" & "', " &_
"Title='" & request.form("Title" & "', " &_
"Address1='" & request.form("Address1" & "', " &_
"Address2='" & request.form("Address2" & "', " &_
"State='" & request.form("State" & "', " &_
"City='" & request.form("City" & "', " &_
"Zip='" & request.form("Zip" & "', " &_
"Country='" & request.form("Country" & "', " &_
"Phone='" & request.form("Phone" & "', " &_
"Fax='" & request.form("Fax" & "', " &_
"email='" & request.form("email" & "', " &_
"Principal_Job='" & request.form("Principal_Job" & "', " &_
"Other_Principal_Job='" & request.form("Other_Principal_Job" & "', " &_
"Principal_Resp='" & request.form("Principal_Resp" & "', " &_
"Other_Principal_Resp='" & request.form("Other_Principal_Resp" & "', " &_
"No_Employees='" & request.form("No_Employees" & "', " &_
"No_Sites='" & request.form("No_Sites" & "', " &_
"Your_role='" & request.form("Your_role" & "', " &_
"Other_role='" & request.form("Other_role" & "', " &_
"Budget='" & request.form("Budget" & "', " &_
"Area_Interest='" & request.form("Area_Interest" & "', " &_
"Other_Area_Interest='" & request.form("Other_Area_Interest" & "', " &_
"Contact_Method='" & request.form("Contact_Method" & "' " &_
"Used = True WHERE PIN=" & pin, connect, adLockPessimistic
Search.Open "SELECT * FROM entries WHERE PIN=" & pin, connect, adLockPessimistic
%>
i hope this all helps!