CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 1999
    Posts
    5

    search on 4 recordsets

    I am using an access backend and DAO for this program.

    I am trying to do a search on a home phone number that will bring up four recordsets that go with this home phone. I know how to do a search on just one recordset, but have no idea how to do this with four recordsets.

    Please help me!




  2. #2
    Guest

    Re: search on 4 recordsets

    Create fifth recordset, append all records from 4 recordsets and make your search. Or make your search in a first recordset, if nothing found then in a second one and so on.
    Vlad


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: search on 4 recordsets

    Faster than brute force method of searching all recs would be to create an new record with INNER JOIN or its variants..
    Ex from MSDN:
    SELECT fields
    FROM table1 INNER JOIN table2
    ON table1.field1 compopr table2.field1 [AND
    ON table1.field2 compopr table2.field2 OR
    ON table1.field3 compopr table2.field3)];

    compopr: is a comparision operator, like <, > , <=, etc

    RK

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

Featured