I need a new set of eyes on this I think. I ran the following query in Access:
It runs successfully.
I get the following error when I run a similar query in my asp page:
Syntax error (missing operator) in query expression '[ListingID]='.Line 46
Line 46 reads:
The code that holds the form data:
~E
Code:
UPDATE cust_inventory
SET [STK]='3450',[YR]='2000',[MK]='Chevrolet',[MD]='6500',[TYPE]='Recyle',
[MILES]='600000',[HRS]='4',[GVW]='90000',[FRGVW]='10000',[RGVW]='80000',
[ENGM]='Cummins',[ENGMOD]='50L',[HP]='550',[TR]='Auto',[TRM]='Allison',
[BMK]='Rugby',[CAP]='20ft',[PRICE]='600000',[RTIRE]='50',[FRTIRE]='50',
[RR]='502',[WB]='1004',[IGVW]='20000' WHERE [ListingID]= 113;
I get the following error when I run a similar query in my asp page:
Syntax error (missing operator) in query expression '[ListingID]='.Line 46
Line 46 reads:
Code:
Set Rec = oConn.Execute("UPDATE cust_inventory SET [STK]='"& frmstk &"',[YR]="& frmyear &",[MK]='"& frmmake &"',[MD]='"& frmmodel &"',[TYPE]='"& frmtype &"',[MILES]='"& frmmiles &"',[HRS]="& frmhours &",[GVW]="& frmGVW &",[FRGVW]='"& frmFRGVW &"',[RGVW]='"& frmRGVW &"',[ENGM]='"& frmengm &"',[ENGMOD]='"& frmengmod &"',[HP]="& frmhp &",[TR]='"& frmtrans &"',[TRM]='"& frmtransmk &"',[BMK]='"& frmbodymk &"',[CAP]="& frmcap &",[PRICE]='"& frmprice &"',[RTIRE]="& frmrtire &",[FRTIRE]="& frmfrtire &",[RR]='"& frmrr &"',[WB]="& frmwb &",[IGVW]="& frmIGVW &" WHERE [ListingID]= "& frmlisting &" ")
Code:
<%=Response.Write("Welcome ")%>
<%=Response.Write(Session("UserName"))%>
<body>
<%
UserID = Session("UserName")
frmstk=Request.Form("stk")
frmlisting=Request.Form("listing")
frmyear=Request.Form("year")
frmmake=Request.Form("make")
frmmodel=Request.Form("model")
frmtype=Request.Form("type")
frmmiles=Request.Form("miles")
frmhours=Request.Form("hours")
frmGVW=Request.Form("GVW")
frmFRGVW=Request.Form("FRGVW")
frmRGVW=Request.Form("RGVW")
frmengm=Request.Form("engm")
frmengmod=Request.Form("engmod")
frmhp=Request.Form("hp")
frmtrans=Request.Form("trans")
frmtransmk=Request.Form("transmk")
frmbodymk=Request.Form("bodymk")
frmcap=Request.Form("cap")
frmprice=Request.Form("price")
frmrtire=Request.Form("rtire")
frmfrtire=Request.Form("frtire")
frmrr=Request.Form("rr")
frmwb=Request.Form("wb")
frmIGVW=Request.Form("igvw")
'frmopt=Request.Form("opt")
if request.form("submit") <> "" Then
~E