My config :
- OS : Windows XP
- Php/Apache Srv : WAMP (php 5.3.0)
I try to connect my little project to a MsSql db. And then create my models.
1. I modified my config/main.php :
'db'=>array( 'connectionString' => 'sqlsrv:host=myServer;port:1433;dbname=myDB', 'emulatePrepare' => false, 'username' => 'sa', 'password' => '123456', ),
2. I have this error message :
CDbException CDbConnection failed to open the DB connection: [08001][Microsoft][SQL Server Native Client 10.0]SQL Server Network Interfaces: Connection string is not valid [87].
I'm sure that the server is accessible, this code is working :
$connectionInfo = array(
'Database'=>$myDB,
'UID'=>$myUser,
'PWD'=>$myPass,
);
$dbhandle = sqlsrv_connect($myServer, $connectionInfo)
or die("Couldn't connect to SQL Server on $myServer : <br />".print_r(sqlsrv_errors(), true));
$query = sqlsrv_query($dbhandle, 'SELECT * FROM myTable');
while($obj = sqlsrv_fetch_object($query))
echo $obj->name.'<br />';I use the sqlsrv because the mssql is not longer supported by php 5.3.0. Is it possible to use sqlsrv with Yii ?
If yes, how ?
Thanks for your help.

Help











