如何找出哪些SQL Server表链接到MS Access?

[英]How can I find out what SQL Server tables are linked to MS Access?


I inherited a MS Access front-end that has linked tables to SQL Server. The linked table names in MS Access do not match the table names in SQL Server. How can I find out what SQL server tables are actually linked to MS Access? Also, if I didn't know what SQL Sever the linked tables were connected to, how could I find that out?

我继承了一个MS Access前端,它将表链接到SQL Server。 MS Access中的链接表名称与SQL Server中的表名称不匹配。如何找出哪些SQL服务器表实际链接到MS Access?另外,如果我不知道链接表连接到哪个SQL Sever,我怎么能找到它?

1 个解决方案

#1


7  

You can use the tabledefs collection to check the connect property and the source table name.

您可以使用tabledefs集合来检查connect属性和源表名称。

CurrentDB.TableDefs("dbo_table_name").SourceTableName
CurrentDB.TableDefs("dbo_table_name").Connect

Or

要么

Dim tdf As TableDef
Dim db As Database

    Set db = CurrentDb

    For Each tdf In CurrentDb.TableDefs
        If tdf.Connect <> vbNullString Then
           Debug.Print tdf.Name; " -- "; tdf.SourceTableName; " -- "; tdf.Connect
        End If
    Next

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2012/05/16/bbfc9b08dae597695469e2e34ee8f34c.html



 
© 2014-2018 ITdaan.com 粤ICP备14056181号