[thelist] SQL
Steve Cook
sck at biljettpoolen.se
Fri Aug 11 09:17:41 CDT 2000
Yo Kev!!
Looks like you've missed the single quotes around your string value
"request.form("minsize")"
As a result, it's parsing the value into the SELECT string.
A tip for debugging these sorts of errors, is to use
SQL = "SELECT * FROM foo;"
Response.Write SQL
That way you would see in your SQL statement the missing single quotes :-)
See ya round!
.steve
> -----Original Message-----
> From: kev.skindrill [mailto:kev.skindrill at bigfoot.com]
>SNIP>
>
> and then I have the SQL statement as follows...
>
> ("SELECT * FROM Deliveries where MinimumVehicleSize=("&pcnum&") and
> Available = 1")
>
> But I get this error message...
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error
> (missing operator) in
> query expression 'MinimumVehicleSize=(Motorbike, Transit, 7
> Ton Truck) and
> Available = 1'.
>
> So as far as I can see I have successfully changed the results of
> request.form("minsize") into a string because it is showing
> up as a comma
> seperated list in the error message, but what is this
> "missing operator"
> business? This code worked perfectly when I had this SQL statement...
>
> ("SELECT * FROM Deliveries where
> MinimumVehicleSize='"&request.form("minsize")&"' and Available = 1")
>
> which (as far as I understand it) amounts to the same thing.
>
> TIA
More information about the thelist
mailing list