PDA

Click to See Complete Forum and Search --> : No "LIKE" in ADO ???


David Laplante
Aug 3rd, 2000, 01:18 PM
I am considering the use of ADO instead of DAO because I want to connect to a SQL Server database but I have read a post (with no reply) of someone how could'nt use a "LIKE 'C*'" in a select statement..

Is it because it can't be done like that or it can't be done at all... or was the guy on the right track ?..

I am asking this because I don't want to change everything just to realize at the end that I can't use a LIKE statement...

thanx

DrewDog_21
Aug 3rd, 2000, 01:32 PM
I didn't see that post, but you can use LIKE statements in ADO. I use them with no problem.

Aug 3rd, 2000, 01:51 PM
the following sql statement should work with ado also.


select * from tablename where columnname like "ABC%"

(i guess your statement had a "*")

Clunietp
Aug 3rd, 2000, 09:25 PM
Sarun is correct

DAO uses the asterisk ( * ) as the wildcard character

ADO uses the percent ( % ) as the wildcard character

JHausmann
Aug 4th, 2000, 01:40 PM
Eventually, access will make you use the % sign as well. It's an ANSI standard for SQL wildcards.

David Laplante
Aug 7th, 2000, 10:01 PM
Thanks for clearing that up people! :)