cakephp - mssql连接字符串

时间:2013-05-27 06:49:10

标签: sql-server sql-server-2008 cakephp

我必须将cakephp与mssql server连接起来。我在我的系统中安装了mssql。如何指定连接字符串?

我试过了:

 public $default = array(
        'datasource' => 'Database/Sqlserver',
        'persistent' => false,
        'host' => 'localhost\SQLEXPRESS',
        'login' => 'username',
        'password' => 'password',
        'database' => 'dbname',
        'prefix' => '',
        //'encoding' => 'utf8',
    );

但是得到了这个错误:

SQLSTATE[08001]: [Microsoft][SQL Server Native Client 10.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. 

0 个答案:

没有答案