Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing all linked tables and their source databases 2

Status
Not open for further replies.

Adamba

IS-IT--Management
Aug 3, 2001
72
GB
Hiya all! [wiggle]

I wonder if anyone could help me a problem i am having[curse].

I am trying to create a database which will sort through all the tables in it and give me a list of all the Linked tables and the database that they originate from. Is this possible?

I am using a form with various variables and a listbox which will hopefully list all the linked tables.

Thanks in advance![elephant2]

[pc3]
Adam [glasses]
 
MSysObjects is the (usually hidden) table of system schema. It includes references to all objects in the database like the link source information.

While it varies a bit by the release, you need to find the menu item which toggles the viewing of Hidden objects (ver 2K, it is [Tools \ Options \ View]. Once you can view the hidden objects, you can simply open the table and browse the contents. MUCH of it will not make any particular sense, particularly at first, but you can see the information you are after rather clearly. Armed with the information on the content and structure, you can easily generate a query to obtain the recordset if interest (all the linked tables). The Query does not need the hidden objects to be visible, so after you are familiar with the process you can re-hide them and reference the table just like any tabledef/recordset.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Here is the SQL for a query which will display the information:

SELECT msysobjects.Name, msysobjects.Database, msysobjects.ForeignName
FROM msysobjects
WHERE ((Not (msysobjects.Database) Is Null));

Ken
 
Hiya!

Thanks Michael & Kewo youve been a great help![thumbsup2]

Can finally put my problem to bed! [sleeping2]

Many Thanks,
[pc3]
Adam [glasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top