-
I'm trying to use the Like operator in SQL Sentece, but it doesn't work, it doesn't found the data. I'm using the following instructions:
strSearch= "SELECT Code, Name FROM Employees WHERE Name Like 'C*'"
ADOrs.Open strSearch, db, adOpenStatic, adLockOptimistic
I'd tried this same instruction in ACCESS 97 and it works fine.
Why in VB6 doesn't work?
Thanks for your time.
-
I don't do ADO, but your SQL syntax works in DAO, so I suspect the problem is in the Open statement. What happens when you run it? Do you get an error, or zero records returned, or...?
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
-
Hai Jose,
I also tried it before. But if you use * it is not responding.
use % as a wildcard to search. It will work in ADO.
Hope you will get your problem solved.
Thanks
Karun
-
Thanks Karun, With % WildCard works perfectly.