Find Databases With Linked Tables

  • Thread starter Thread starter Debbie Hatten
  • Start date Start date
D

Debbie Hatten

I have a database that is maintained on a network drive
that many users connect to via linked tables in their own
databases. Does anyone know of a way to find out what
databases have tables that link to mine without opening
each one individually?

Thanks!
 
You should be able to query the (usually hidden) System Catalog table
without actually having to open the database:

SELECT Name, Database, Connect, ForeignName
FROM MSysObjects IN 'C:\Documents and Settings\DJSteele\Test97.MDB'
WHERE Type = 6
AND Database = 'C:\Documents and Settings\DJSteele\TestADO.mdb
ORDER BY Name

This SQL will find any tables in database Test97.MDB that point to
TestADO.mdb

If you have a list of all of the MDBs you want to check, just keep running
this, changing what database it's pointing to in the IN part of the FROM
clause.
 
Back
Top