在 Access 2003 中编辑链接表信息
我有一个 Access 2003 数据库,其中包含与 SQL Server 2005 数据库的链接表。用于在 Access 和 SQL Server 之间创建 ODBC 连接的用户信息(密码)最近已更新。
当我打开 Access 数据库并尝试编辑链接表信息时,我就可以打开表并查看我的数据。但是,当我关闭 Access 并重新打开 Access 数据库时,密码信息似乎已恢复,并且出现 ODBC 连接错误。
有人知道我做错了什么吗?
作为后续行动,我们似乎有大约十几个带有大量链接表的 Access 数据库都需要此更新。这是更新此信息的最佳方式吗?链接表似乎是使用不同的计算机创建的,因为 ODBC 连接中指定的工作站 ID 不同。
I have an Access 2003 database with linked tables to a SQL Server 2005 database. The user information (the password) that is used to create an ODBC connection between Access and SQL Server was recently updated.
When I open the Access database, and try to edit the Linked table information I am then able to open the tables and see my data. However, when I close Access and and reopen the Access database it appears the password informtion has revereted back and I get an ODBC connection error.
Anyone know what I am doing incorrectly?
As a follow up, it appears we have about a dozen Access databases with numerous linked tables that all need this update. Is this the best way to update this information? The linked tables seem to have been created using different machines as the Workstation-ID specified in the ODBC connection is different.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
编写一个例程,从 TableDef 更新 Connect 属性并使用 RefreshLink 保存更改。
Write a routine, that update the Connect Property from the TableDef and save the change with RefreshLink.
链接表管理器 (LTM) 的问题在于当您拥有实际上链接到 SQL 视图的链接表时。在这种情况下,LTM 将重新链接“表”而不为它们重新分配适当的 PK,并且它们将变得不可更新。
我已经编写了一些从 VBE 开始的代码,这是一件快速而肮脏的事情,但如果您需要的话,您肯定可以对其进行调整。
有 2 个子程序,一个用于表,一个用于通路查询。
The problem with Linked Table Manager (LTM), is when you have linked tables that are in fact links to SQL Views. In that case, LTM will relink the "tables" without reassigning them the proper PK, and they will become non updatable.
I have written some code that I used to start from VBE, it is a quick and dirty thing, but you could surely adapt that if you need it.
There are 2 subs, one for the tables, and one for the passthru queries.