Microsoft OLE DB Provider for ODBC Drivers error ‘80040e10’
[ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/jby2202/mz_asp_sql.asp, line 51
I’ve already checked line 51. It goes like this:
rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3, 3
As I can see, I already have 2 parameters. What error is the server refering to?
I’ve checked it already. and I don’t think I’m refering to any non-existing columns or tables.
hmm… my database has 6 columns. The 1st column is the “Auto-number” thingy. The other 5 contain the data which I have entered. When I run the search thing for the last 4 ‘headings’ or columns, I can get some results. But when I try to key in some numbers to search under the 2nd criteria, I get the error that I have too few parameters. Expected 2.
my sql ststement does not have a WHERE clause because i need to use the entire database.
how am i supposed to display the contents of the SqlJunk variable?
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")
response.write "Debug:" & SqlJunk
response.end
'rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3, 3 ------> error occurred at this line
if you have a column named X/X you must do
If Request.Form("TypeSearch") = "X/X" Then
SqlJunk = SqlJunk & " WHERE [X/X] LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
Better still, don’t use special characters in identifiers at all.