Forum Moderators: open
Below is an error that I keep getting
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '¤'.
/content/drinks.asp, line 39
here is the code that is at line 39 and above
35if request("currentbrand") = "" then currentbrand = brands("id") else currentbrand = request("currentbrand")
36Set drinks = Server.CreateObject("ADODB.Recordset")
37sqlstmt1 = "SELECT * FROM drinktypes WHERE brandno = " 38& currentbrand
39drinks.Open sqlstmt1, db, 3, 3
here is the code at line 1
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file ="../connection.asp"-->
<%
I can't see where the syntax error would be....I hope you can help me and point me in the right direction.
Thanks for your help :-)
if request("currentbrand") = "" then currentbrand = brands("id")
else currentbrand = request("currentbrand")
end if
Set drinks = Server.CreateObject("ADODB.Recordset")
sqlstmt1 = "SELECT * FROM drinktypes WHERE brandno = " & currentbrand
drinks.Open sqlstmt1, db, 3, 3
Also, the term - request - is not used by itself. Depending where you need to get the ID from it could be Request.QueryString or Request.Form or such like.
Hope this helps