【问题标题】:Php Connection sqlsrv_connect()?php连接sqlsrv_connect()?
【发布时间】:2014-05-09 12:36:46
【问题描述】:

不知道为什么我没有解决问题 尽管做了这么多我的研究没有得出结论 也许有一个解决方案可以帮助您解决问题。

我的问题是:我无法建立连接的原因是什么。

<?php

$server = "TOSHIBA";

$baglantiBilgi = array("Database"=>"test");
$baglan = sqlsrv_connect($server, $baglantiBilgi);

if($baglan){
    echo "Baglanti saglandi.<br />";
}else{
    echo "baglanti yok.<br />";
    die( '<pre>'.print_r( sqlsrv_errors(), true).'</pre>');
}
?>

//baglanti yok.
Array
(
    [0] => Array
        (
            [0] => IMSSP
            [SQLSTATE] => IMSSP
            [1] => -49
            [code] => -49
            [2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
            [message] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
        )

    [1] => Array
        (
            [0] => IM002
            [SQLSTATE] => IM002
            [1] => 0
            [code] => 0
            [2] => [Microsoft][ODBC Driver Manager] Veri kaynağı adı bulunamadı ve varsayılan sürücü belirtilmemiş
            [message] => [Microsoft][ODBC Driver Manager] Veri kaynağı adı bulunamadı ve varsayılan sürücü belirtilmemiş
        )
    )

这方面有什么问题请帮帮我。

【问题讨论】:

  • 安装 Microsoft SQL Server 2012 Native Client。
  • 啊谢谢你们!!!杰伊·巴特

标签: php sql sql-server


【解决方案1】:

正如 Jay Bhatt 已经评论的那样,这就是答案:

安装Microsoft SQL Server 2012 Native Client

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多