Hi all
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:
My db settings are as follows:
Any ideas why this is happening?
I would really like to use the "shared" connection instead of create a new one every time![:)]()
Best regards
ycast
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
$connection=new CDbConnection($dsn,$username,$password);
Unfortunately, when using the Yii database component (as specified in config/main.php) I get the following error:
Quote
CDbConnection failed to open the DB connection: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes
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
Best regards
ycast