【发布时间】:2016-11-24 03:20:24
【问题描述】:
我正在尝试使用 php 和 xampp 连接到我的 MS SQL Server (2008 R2)。运行代码时出现此错误:
无法建立连接。
数组
(
[0] => 数组
(
[0] => IMSSP
[SQLSTATE] => IMSSP
[1] => -49
[代码] => -49
[2] => 此扩展需要 Microsoft ODBC Driver 11 for SQL Server。访问以下 URL 以下载适用于 x86 的 SQL Server 的 ODBC 驱动程序 11:http://go.microsoft.com/fwlink/?LinkId=163712
[消息] => 此扩展需要 Microsoft ODBC Driver 11 for SQL Server。访问以下 URL 以下载适用于 x86 的 SQL Server 的 ODBC 驱动程序 11:http://go.microsoft.com/fwlink/?LinkId=163712
)
[1] => Array
(
[0] => IM002
[SQLSTATE] => IM002
[1] => 0
[code] => 0
[2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
[message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
)
)
所以,我决定尝试安装 ODBC 驱动程序 11。我无法在 Windows 10 上安装驱动程序,因为它不受支持,所以我下载了 ODBC 驱动程序 13,但它仍然无法正常工作。有没有办法可以重新配置 ODBC 驱动程序 13,以便它可以代替 ODBC 驱动程序 11?如果还有什么我可以提供的有用的,请告诉我。我不能为此使用 MySQL,也不能更新 SQL Server。
【问题讨论】:
标签: php sql-server xampp odbc