簡體   English   中英

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

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

我嘗試使用sqlsrv_connect連接到MS SQL,在安裝ODBC 11之前,我收到了安裝ODBC 11所需的錯誤,所以我安裝了它。 安裝后,我再次收到另一條錯誤消息

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
        )

)

是否可以連接這些連接?

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>');
        }

    }

安裝了哪個版本的Microsoft PHP sql驅動程序? 您需要較舊版本的驅動程序。

Tech Republic有一篇不錯的文章Tech Republic Microsoft SQL Server驅動程序

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM