如何使用 ODBC 连接到我的 64 位 SQL Server?

2021-11-25 00:00:00 sql odbc 64-bit sql-server

我最近在我的 Windows 7 Ultimate x64 家用机器上安装了 SQL Server 2008 Express.我也有 IIS 7.5 和 PHP 5.3,我试图通过 ADODB 连接到 SQL,但一直得到这个错误:

I recently installed SQL Server 2008 Express on my Windows 7 Ultimate x64 home machine. I also have IIS 7.5 with PHP 5.3, and I was trying to connect to SQL via ADODB, but kept getting this error:

[Microsoft][ODBC Driver Manager] The specified DSN contains an
architecture mismatch between the Driver and Application

在互联网上进行了少量挖掘后,我认为这是因为 SQL Server ODBC 驱动程序适用于 32 位操作系统,而我的是 64 位操作系统.首先,我说得对吗?这就是我遇到麻烦的原因吗?其次,如果是这样,我该如何解决这个问题?是否有任何适用于 64 位操作系统的更新的 ODBC 驱动程序?我看了,但找不到任何...

After doing a small amount of digging on the internet, I think this is because the SQL Server ODBC driver is meant for 32-bit operating systems, and mine's 64. First of all, am I correct? Is this the reason I'm running into trouble? Secondly, if so, how do I fix this? Are there any updated ODBC drivers that work with 64-bit operating systems? I looked but was unable to find any...

推荐答案

你说得对,这与比特有关.

You're right in that it has to do with the bits.

希望这有帮助:

--来自 MSDN --

--From MSDN --

在64位下管理连接到32位驱动的数据源平台,使用 c:windowssysWOW64odbcad32.exe.管理数据连接到 64 位驱动程序的源,使用c:windowssystem32odbcad32.exe.如果使用 64 位 odbcad32.exe要配置或删除连接到 32 位驱动程序的 DSN,您将收到这条消息.

To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:windowssysWOW64odbcad32.exe. To manage a data source that connects to a 64-bit driver, use c:windowssystem32odbcad32.exe. If you use the 64-bit odbcad32.exe to configure or remove a DSN that connects to a 32-bit driver you will receive this message.

相关文章