ADO, Access 97 & 'LIKE' in Whereclause

I pass a simple select statement to the open method of an ADO recordset and it fails to return any records.  The SQL Statement is:
SELECT * FROM CLIENT
WHERE LAST_NAME LIKE "SMI*"

If I paste this statement into the SQL design window in Access 97, it returns the appropriate # of recs.  All other SQL statement types that I have used that did not include "LIKE" in the Whereclause return the appropriate # of recs.

Any thoughts?

dfhainesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kfehribaCommented:
Hate to ask... but it never hurts... Are you searching for the same case? The like statement is case sensitive.
0
dfhainesAuthor Commented:
All data is upper.  Thanks for the heads up, though.
0
EDDYKTCommented:
replace * to %

ie

SELECT * FROM CLIENT
WHERE LAST_NAME LIKE "SMI%"

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

SicilianCommented:
I agree with trying to replace * with % but here are two other things. Use single quotes instead of double quotes and ADO doesn't like any other symbols in it's field names so try putting [] around the field name.

Sicilian
0
dfhainesAuthor Commented:
EDDYKT,

* -> %.  That did it.  Please answer the question so that I may pass on your points.

Thanks,
DFH
0
mark2150Commented:
Use the "Grade Comment as Answer" feature...

M
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.