Results 1 to 5 of 5

Thread: IndexOf();

  1. #1
    Join Date
    Sep 2004
    Location
    Florida
    Posts
    13

    Unanswered: IndexOf();

    Basically I am looking for a way to use an SQL query to access my Access database and find in a collumn of product names, a series of lines that contain a refrence to the passed string...(i know this isn't very clear so here is an example of what I mean).

    I pass the query the word "sign" and I have a column that contains product names. Like:
    1. Signature
    2. Timmy
    3. Signs
    4. Age
    5. Clear the Signs


    And the query would return rows 1, 3, 5; is there a way to format a query to do this. Or should I query the entire database and then have my application loop through the results and find the index of that string. My only worry here is that it will have a huge imact on memory if I have to bring the entire database into the application. Please help.

  2. #2
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146
    I might have misunderstood, but why not just use something like the following in your query criteria to return all records that contain "sign"?


    LIKE "*sign*"

  3. #3
    Join Date
    Sep 2004
    Location
    Florida
    Posts
    13
    OK so my query should look somehting like this:
    SELECT product_id FROM Products WHERE product_name LIKE "*sign*"
    Right?

  4. #4
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146
    That should do it for you

  5. #5
    Join Date
    Sep 2004
    Location
    Florida
    Posts
    13
    Unfortunately I don't think this is working. I don't have any error messages but it isn't returning anything from the ADO obj.

    fixed it %sign%
    Last edited by simpleSoft; 11-20-04 at 01:47.

Posting Permissions

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