gpt4 book ai didi

sql - Excel 2010 32 位 Windows 7 64 位 odbc-连接问题

转载 作者:行者123 更新时间:2023-12-03 02:58:41 24 4
gpt4 key购买 nike

我们有一个 Excel 电子表格,通过 vba odbc 连接连接到 Sage(用户名和密码 *'d)

Set CN = New ADODB.Connection
With CN
.Provider = "MSDASQL"
.ConnectionString = "DSN=SageLine132;UID=******;PWD=******;"
.CursorLocation = adUseClient
.Open
End With

此连接在装有 Office 2010 的 32 位 Windows XP 计算机上运行良好,但在运行 Office 2010 32 位的新 Windows 7 64 位计算机上运行良好。

当我打开 odbc32 时在 syswow64 文件夹中安装了系统 DSN。

是否有人可以解决此问题或无需访问系统 DSN(DSN-Less)即可进行连接的方法?

最佳答案

我怀疑这与存储在 syswow32/syswow64/ 中的可执行文件有关。

我从未使用过 Sage,但我以前在 64b 系统上遇到过 MyODBC 驱动程序的问题,这里的解决方案可能会对您有所帮助:

for win 64b users (XP, win7), in order to access your MyODBC driver (or any other DB driver), you need to run the Data Sources from %windir%\SysWOW64\odbcad32.exe.

enter image description here

To make the change permanent, you can add a new Data Sources icon in you Control Panel (must do this from the explorer as it will prompt you for confirmation), name it Data Sources x64, and point it to %windir%\SysWOW64\odbcad32.exe

enter image description here

完整文章,请参阅here .

关于sql - Excel 2010 32 位 Windows 7 64 位 odbc-连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12057725/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com