Re: ADO ODBC CONNECTION STRING

From: Val Mazur (group51a_at_hotmail.com)
Date: 03/27/04


Date: Fri, 26 Mar 2004 23:30:20 -0500

Hi John,

I do not think you can do it using ADO. Database property of the ADO
connection returns name of the database of the active opened connection, but
I think in case of the linked tables, you will get database name of your
MDB.

-- 
Val Mazur
Microsoft MVP
"John Lanford" <lanfojo@tulsaschools.org> wrote in message 
news:B860E141-B516-4417-B460-C82AE28125E1@microsoft.com...
>I have an access data base (mdb) with linked tables from an Ms sql 
>database.
> I am trying to use ADO in VBA to list the odbc connection string for each 
> linked (pass through) table.
> I have some code using DAO that can do this using the "connect" property 
> of a tabledef object. But
> I can't find the equivalent of this in ADO. I have used a catalog object 
> to retrieve the names of all the
> pass-through tables but I can't find the connection string. I use linked 
> tables from 2 different sql databases
> and I want to find the name of the database where the table is, I am 
> trying to write a procedure to relink
> the tables. I can work around this using the DAO  properties. But I am 
> trying to use ADO instead of DAO
> whenever I can.
>
> Thanks
> John Lanford Tulsa Public Schools
> 


Relevant Pages

  • Re: Knowledge Base Help Not working
    ... Database is a DAO object. ... both Access 2000 and 2002 use ADO. ... Microsoft DAO 3.6 Object Library, ... For example, to ensure that you get a DAO recordset, you'll need to ...
    (microsoft.public.access.formscoding)
  • Re: ADO and the Find method
    ... You cannot compare DAO and ADO. ... database, which has OLEDB provider. ... >>>> Opening of the whole table was not a good design anytime. ...
    (microsoft.public.vb.database.ado)
  • Re: Crosstab query error 3104
    ... Thankfully very few compile errors had to ... I have both DAO & ADO references checked but DAO is higher so it is taking ... Thanks - I inherited the original database & am gradually working through ... then perhaps you've removed the reference to ADO. ...
    (microsoft.public.access.queries)
  • Re: Database variable change from 97 to 2003
    ... Access 2003 has references set to both DAO ... and ADO and, perhaps unfortunately, the ADO reference is set higher in ... use Dim rcd As ADODB.Recordset) ... > modules, however, I get errors on the database variable ...
    (microsoft.public.access.modulesdaovba)
  • Re: Creating tables
    ... Frederico has recommended you to replace the solution with an ADO one. ... DAO is "Data Access Objects". ... direct interface to the database engine and it is being implemented in open ... SQL Server with stored procedures and triggers, ...
    (comp.lang.cobol)