Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL query using wildcard in Access2000 not working???

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-05 : 00:06:44
Jim Rudnick writes "Trying to craft an SQL string, where I ask the Access2000
dbase, to find all MODEL cars that have a user entered
string as a part of that string. For instance, if the user
types in "Sunfire" I want to be able to go to the dbase
and find all "Sunfire *" records within that column...so the resulting list of cars includes ALL Sunfires, Sunfire GT, Sunfire Limiteds etc. etc.

Here's the teeny SQL statement that AIN'T working...

SQL = "SELECT * FROM tblVehicles WHERE Model LIKE 'Sunfire*'"

The Access wildcard is * I'm told. The column in
Access2000 that holds the vehicle models is definitely
called MODEL. The rest of the statement also looks fine.
Even tried using % as this is a JET puppy...but no avail.When I did I got the following error...

Microsoft JET Database Engine error '80040e14'
Syntax error in string in query expression 'Model LIKE 'Sunfireð/LM/W3SVC/1/ROOT'.

/Gorrud/10.28.01/list.asp, line 157

which points to this line on the list.asp page...

rs.Open SQL, conn, 2, 3

????????????????????????


Any idea why this is reporting NO records...when there's
more'n 150 Sunfires (GT, SE, Limiteds just to give a few
qualifiers) in the dbase???

Help here guys???

What'd I do wrong???
Jim
"
   

- Advertisement -