I would like to connect to a remote MS-SQL Server with the pdo_dblib driver (freetds) on CentOS 5.5.
After some minor problems with the OS configuration, I finally got the connection working with a manual connect with
Unfortunately, when using the Yii database component (as specified in config/main.php) I get the following error:
when I try to retrieve the connection with this code in my Controller:
$connection = Yii::app()->db;
My db settings are as follows:
'db'=>array( 'connectionString' => 'dblib:host=SERVER_IP;dbname=DB', 'emulatePrepare' => false, 'username' => 'USER', 'password' => 'PASS', 'charset' => 'utf8', ),
Any ideas why this is happening?
I would really like to use the "shared" connection instead of create a new one every time