Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP to Access DB using "Like" problem

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
0
0
GB
this is doing my head in. whenever I do a query in access2k using something similar to;
select * from user where firstname like "Bob*"
everything is fine and peachy. but run this thru ASP using adodb recordset etc, I get;
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

I just can't understand it. It's not the connection to the db, sine if I change the sql to "select * from user" it works fine.

Please people - HEELPP!! :eek:)

Muchos gracias.
 
try this
select * from user where firstname like "Bob%"
 
No, that's for Like in SQL Server. Access uses *. I've tried both though, to no avail. . :eek:(
 
how abt single quote ?
select * from user where firstname like 'Bob%'
 
a-ha - now that one's a different kettle of fish entirely. single quotes will give us . . oh wait . . well I never. Would you look at that. I was certain I'd tried that, since it seems so obvious - single quotes and a % are the way to go! looks like I was wrong about Sql Server using % and A2K using * - the stupid Help files are not to be trusted . .
Many thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top