Click to See Complete Forum and Search --> : What is wrong with this Query???


shanuragu
07-17-2003, 07:37 AM
Hi


ordno1 = Request.QueryString("ordno1")
ordno2 = Request.QueryString("ordno2")

sqlstr = "Select * FROM OrderDetails WHERE (OrderId BETWEEN ordno1 And ordno2) ORDER By OrderId"
RsRange.Open sqlstr, Con,adlockoptimistic,, adCmdText


What is wrong with the above sql statement. I am getting the following error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.

The above query is executing well in ms access Query.

Please help.

Shara