Results 1 to 8 of 8

Thread: [RESOLVED] ADODC Recordset.Find - Single Character Wildcard

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Posts
    19

    Resolved [RESOLVED] ADODC Recordset.Find - Single Character Wildcard

    Sorry to be a bother again, but nowhere can I find
    what the ADODC single-character wildcard is for the Find method.
    Help says underscore (_) but it doesn't work for me.
    e.g.:
    Adodc1.Recordset.Find "Tag LIKE 'ab_d'"

    *** Answer: ADODC doesn't support single character wildcards ***

    Underscore works if it's run in an SQL statement:
    e.g.
    SQL="SELECT * FROM Table1 WHERE Title LIKE 'ab_d'"
    Adodc1.RecordSource = SQL
    Adodc1.Refresh

    I could just use SQL, but I'm not sure what SQL statement
    to use to do a Find within an existing record set. I can't use
    a SELECT because the user may have changed a record that
    would disappear with a new SELECT.

    *** Answer: Unanswered ***

    Also can't determine how to deal with finds where
    the % and _ characters may be part of the search
    pattern; e.g.: .Find "filename LIKE 'file_001.txt'" or
    "Result LIKE '50%'". The backslash (\) Escape character
    doesn't work as it does with MySQL.

    *** Answer: Square brace literals - LIKE '50[%]' gets 50% and not 50lb ***
    Last edited by jm1248; Jan 15th, 2007 at 08:23 AM. Reason: Summarize

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