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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Table Check 1

Status
Not open for further replies.

ChrisNorris

Programmer
Sep 3, 2001
7
0
0
AU
I am listing all the tables in a selected Access database using VB.

When I add these tables to a list box I need to know if the table is a linked table or stored in the selected database.

I use the Containers object to loop through the tables but cannot find a command to check if the table is linked or not.

Any help would be apreciated
 
Set rs = cnnnew.OpenSchema(adSchemaTables)
If Not (rs.EOF And rs.BOF) Then
Do Until rs.EOF
If UCase$(rs(3)) = "TABLE" Then
lstTables.AddItem rs(2)
End If
rs.MoveNext
Loop
End If

For a linked table UCase$(rs(3)) = "LINK" Peter Meachem
peter@accuflight.com
 
Hi Peter,

Thanks for your suggestion I like the approach and would like to use it.
The only problem I have is that RS(3) always returns TABLE.
I have checked out the MSDN Library and found the OpenSchema Documentation I cannot seem to track down the bit about Linked tables any extra help you can offer would be of a great help.

Thanks for your time
Chris
 
Thats odd. Mine says LINK for the Access97 database I tried it on. I didn't realise until I tried to reply to your question that LINK was returned. I thought perhaps another parameter would show that the table was linked. I can't find any documentation either! Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top