命令行更改 MS Access ODBC 系统 DSN 的 .mdb 文件路径?
我可以使用什么 odbcconf.exe 命令行来更改现有系统 DSN 的 MS Access .mdb 文件的路径?
What odbcconf.exe command line can I use to change the path to the MS Access .mdb file for an already existing System DSN?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须通过更改注册表来完成此操作。与此示例类似的内容取自我之前使用过的网络
如果您查看注册表中现有的 DSN 配置,那么您将了解如何修改代码以适合您的情况
You would have to do it by changing the registry. Something along the lines of this example taken from the net that I have used before
If you look at your existing DSN config in the registry then you will get an idea of how to modify the code to suit your situation
要回答所提出的问题,这里有一个使用 odbcconf.exe 的解决方案,而不是直接进入注册表:
有两点让我困惑了一段时间:
DBQ=
而不是Database=
作为 mdb 路径。使用后者时,一切似乎都可以工作,但是连接链接已命名,但实际上并未在 ODBC 管理器中定义。To answer the question as asked, here is a solution using odbcconf.exe instead of going straight to the registry:
Two items of note which had me tripped up for a while:
DBQ=
and notDatabase=
for the mdb path. When using the latter everything appears to work, however the connection link is named but not actually defined in the ODBC Administrator.