MS-SQL Conection Problem

Hallo

I know there are some topics in this Forum, but none of them where solving my problem.

My problem:

I tried to connect to a MS-SQL database.

‘db’=>array(

		'connectionString' => 'mssql:host=192.168.1.10;dbname=kws',


		'emulatePrepare' => false,


		'username' => 'schulung',


		'password' => 'schulung',


	),

The database is not local.

The extensions for php are loaded:

php_pdo_mssql.dll

I got the following Error message:

CDbConnection failed to open the DB connection: SQLSTATE[HY000] General SQL Server error: Check messages from the SQL Server. (severity 5)

I hope i can get it working till the end of this weekend.

Greetz

If you running this on *nix, try to connect to MS-SQL via dblib:




'connectionString' => 'dblib:host=192.168.1.10;dbname=kws',  



I use mssql on Windows and dblib on *nix for working with MS-SQL via Yii/PDO and all works fine.

Here: http://forum.dklab.ru/viewtopic.php?t=38416 man had the same error, and in next post he say’s that problem was with DB name

Found the problem. It was the too old driver. With the new driver it is working.

Helo huseldusel,

you can tell me step by step how you connect to SQL Server with Yii, I’ve tried everything.

Thank you very much.