Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ADO Cross-database query (2000)

    I am trying to write a simple select statement which links two tables from two separate databases.

    There is an id field that links them, and I wish to do this using ADO any suggestions? Example table structure below.

    db1.Table1 db2.table2
    Table1_ID Table2_ID
    Table1_Desc Table2_Desc
    Table2_ID

    I want to return Table1.* and Table2_Desc where table2_ID is equal

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ADO Cross-database query (2000)

    The easiest way is to use linked tables, you can then design the query interactively in Access and view the resulting SQL statement.

  3. #3
    Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ADO Cross-database query (2000)

    is there another way other than linked tables?

    I would like to stear clear of linked tables if possible.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ADO Cross-database query (2000)

    > I would like to stear clear of linked tables if possible.

    Why?

  5. #5
    Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ADO Cross-database query (2000)

    Just realised I should explain why.

    As the table2 is actually held locally on the users PC and updated via version control. This is because lots of applications use this data and it does not change very often, It is company Hierarchy information.

    I know there is a way to do this in DAO, but need to use ADO. Any help?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ADO Cross-database query (2000)

    Sorry, no. Perhaps someone else can help.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ADO Cross-database query (2000)

    I must tell you that DAO is faster than ADO in Access 2000, and in either object model, it's quite possible to create a link to a table, use it and then unlink it.
    Charlotte

Posting Permissions

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