Please help me to find my mistake in this short piece of code.
Dim rsItems
catnumber = CLng(Request.Querystring)
strSQL = "SELECT * FROM Item " & _
"WHERE ExpirationDate >= #" & FormatDateTime(Now,2) & "# " & _
"AND CatID = catnumber " & _
"AND ItemStatus = 'Active' ;"
Set rsItems = Server.CreateObject("ADODB.Recordset"
rsItems.Open strSQL, objConn
When I take away
"AND CatID = catnumber " & _
it work perfect. Otherwise the error message is on line
rsItems.Open strSQL, objConn:
"No value given for one or more required parameters". The database is OK.
Thanks!
Dim rsItems
catnumber = CLng(Request.Querystring)
strSQL = "SELECT * FROM Item " & _
"WHERE ExpirationDate >= #" & FormatDateTime(Now,2) & "# " & _
"AND CatID = catnumber " & _
"AND ItemStatus = 'Active' ;"
Set rsItems = Server.CreateObject("ADODB.Recordset"
rsItems.Open strSQL, objConn
When I take away
"AND CatID = catnumber " & _
it work perfect. Otherwise the error message is on line
rsItems.Open strSQL, objConn:
"No value given for one or more required parameters". The database is OK.
Thanks!