LIKE statement in ADO prodices no results

V

Vlad Botvinnik

I have a front/end and back/end MS Access databases that I am connecting via
ADO.
In the f/e I am issuing a query containing LIKE statement. The very same
query works fine when issued in the b/e Access mdb.
When placed in f/e VBA code, it does not work, there are no results returned,
but no syntax error. I have a strong suspicion that the wildcard * may not
work properly with ADO?
My query is something like this:
"Select field1, field2 from tbl where field2 LIKE '*blah*'"
after successful DAO connection in VBA.
There are no results. But there are results when the same query is issued in
the b/e as a saved query.
Any help is appreciated.
 
D

Duane Hookom

ADO uses % as a wild card character rather than *.
Select field1, field2 from tbl where field2 LIKE '%blah%'
 
A

Aaron Kempf

yes; move to ADO syntax and use Access Data Projects

with ADP you can even use fulltext search; it is about 100 times faster than
anything in the MDB world
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top