简体   繁体   English

PHP:ODBC 11不支持到sql Server 2000或更早版本的连接

[英]PHP: ODBC 11 does not support connections to sql server 2000 or earlier version

I'm trying to connect to MS SQL using sqlsrv_connect, before I installed ODBC 11 I got error that required to install ODBC 11 so I installed it. 我尝试使用sqlsrv_connect连接到MS SQL,在安装ODBC 11之前,我收到了安装ODBC 11所需的错误,所以我安装了它。 After i Install I got another error message again 安装后,我再次收到另一条错误消息

Array
(
    [0] => Array
        (
            [0] => 08001
            [SQLSTATE] => 08001
            [1] => 22
            [code] => 22
            [2] => [Microsoft][ODBC Driver 11 for SQL Server]ODBC Driver 11 for SQL Server does not support connections to SQL Server 2000 or earlier versions.
            [message] => [Microsoft][ODBC Driver 11 for SQL Server]ODBC Driver 11 for SQL Server does not support connections to SQL Server 2000 or earlier versions.
        )

    [1] => Array
        (
            [0] => 08001
            [SQLSTATE] => 08001
            [1] => 22
            [code] => 22
            [2] => [Microsoft][ODBC Driver 11 for SQL Server]Client unable to establish connection
            [message] => [Microsoft][ODBC Driver 11 for SQL Server]Client unable to establish connection
        )

)

Is this possible to connect these connections? 是否可以连接这些连接?

function access_store($ips){
        $conInfo = array("Database"=>"site5");
        $conn = sqlsrv_connect($ips, $conInfo);
        if($conn){
            echo'Connection SUccess';
        }else{
            die('<pre>'.print_r( sqlsrv_errors(),true ).'</pre>');
        }

    }

What version Microsoft PHP sql driver installed? 安装了哪个版本的Microsoft PHP sql驱动程序? You need an older version of the driver. 您需要较旧版本的驱动程序。

Tech republic has a good article Tech republic Microsoft SQL server driver Tech Republic有一篇不错的文章Tech Republic Microsoft SQL Server驱动程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM