简体   繁体   中英

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. 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? You need an older version of the driver.

Tech republic has a good article Tech republic Microsoft SQL server driver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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