Access中链接表的连接字符串

Access中链接表的连接字符串

本文介绍了如何更改MS Access中链接表的连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我刚刚开始一项新工作,我的部分职责是支持一些旧的Access Database应用程序,直到我可以用更好的东西替换它们为止.我注意到的第一件事是Access数据库使用链接表(链接到SQL Server),但它们指向生产环境.在进行任何更改之前,我想设置一个测试环境并将Access文件指向一个测试SQL Server.

So I just started a new job and part of my responsibilities are to support some old Access Database applications until I can get them replaced with something better. One of the first things I noticed is that the Access Database uses Linked Tables (linked to SQL Server), but they're pointing to production. Before I made any changes I wanted to set up a test environment and point the Access file to a test SQL Server.

这是我迷路的地方.我不知道如何更改链接表指向的位置.我在此处上看到了一些建议进行更改的地方它用代码编写,但是形式似乎在设计时就受约束了,我更喜欢在设计模式下进行更改,以使Test和Prod版本完全分开运行.我找不到在任何地方完成此操作.

Here is where I'm lost. I can't figure out how to change where the linked tables are pointing to. I've seen on here where some have suggested to change it in code, but forms seem to be bound at design time and I'd prefer to make the changes in Design mode so that the Test and Prod versions run completely separate. I can't find where this is done anywhere.

有人可以指出正确的方向吗?我不想在运行时更改连接属性...

Is there someone that could point me in the right direction? I do NOT want to change the connection properties at run time...

谢谢,约翰

推荐答案

您基本上想为开发或测试环境设置新的ODBC数据源,然后使用MS Access的链接表管理器将其指向新表.

You basically want to set up a new ODBC data source to a dev or test environment then use MS Access's Linked Table Manager to point it to the new tables.

  • 打开包含表链接的数据库.
  • 在工具"菜单上,指向数据库实用程序",然后单击链接".表管理器.
  • 选择总是提示输入新位置"复选框盒子.
  • 选中要链接的表的复选框
    更改,然后单击确定.
  • 在选择新位置"对话框中,指定新位置,单击打开",然后单击确定".
  • Open the database that contains links to tables.
  • On the Tools menu, point to Database Utilities, and then click LinkedTable Manager.
  • Select the Always prompt for new location checkbox.
  • Select the check box for the tables whose links you want to
    change, and then click OK.
  • In the Select New Location of dialog box, specify thenew location, click Open, and then click OK.

这篇关于如何更改MS Access中链接表的连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 00:23