Results 1 to 6 of 6

Thread: No "LIKE" in ADO ???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241
    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

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    I didn't see that post, but you can use LIKE statements in ADO. I use them with no problem.

  3. #3
    Guest
    the following sql statement should work with ado also.


    select * from tablename where columnname like "ABC%"

    (i guess your statement had a "*")


  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Sarun is correct

    DAO uses the asterisk ( * ) as the wildcard character

    ADO uses the percent ( % ) as the wildcard character

  5. #5
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Eventually, access will make you use the % sign as well. It's an ANSI standard for SQL wildcards.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Thumbs up

    Thanks for clearing that up people!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width