命令行将路径更改为MS Access ODBC系统DSN的.mdb文件? [英] Command line to change path to .mdb file for MS Access ODBC System DSN?

查看:154
本文介绍了命令行将路径更改为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?

推荐答案

要回答所问的问题,以下是使用odbcconf.exe而不直接进入注册表的解决方案:

To answer the question as asked, here is a solution using odbcconf.exe instead of going straight to the registry:

odbcconf.exe configsysdsn ^
  "Microsoft Access Driver (*.mdb, *.accdb)" ^
  "DSN=OurConnectionName;DBQ=X:\Path\to\OurMsAccessDB.mdb"

让我绊了一会儿的两个笔记:

Two items of note which had me tripped up for a while:

  • 确保在64位系统上使用64位odbcconf.exe,请参阅
  • make sure you use 64bit odbcconf.exe when on a 64bit system, see https://stackoverflow.com/questions/6721702/windows-7-64-bit-odbc-drivers-for-ms-access-missing.
  • use DBQ= and not Database= 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.

这篇关于命令行将路径更改为MS Access ODBC系统DSN的.mdb文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆