|
-
Feb 15th, 2000, 08:06 AM
#1
Thread Starter
New Member
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.
-
Feb 15th, 2000, 11:26 AM
#2
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!"
-
Feb 15th, 2000, 11:54 AM
#3
Member
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
-
Feb 16th, 2000, 02:31 AM
#4
Thread Starter
New Member
Thanks Karun, With % WildCard works perfectly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|