Small info how you can connect to a IBM DB2 Database on Windows with Yii.
1) Check if you have enabled PDO_ODBC (with phpinfo or in your php.ini)
2) Make a System-DSN Settings for your DB2 Database (if not already existing)
3) Add following code to your config file.
'db2' => array( 'class'=>'CDbConnection', 'connectionString' => 'odbc:DSN=DB2db;UID=username;PWD=password', 'emulatePrepare' => false, 'charset' => 'utf8', ),
HINT: emulatePrepare does not work, so deactivate it or delete the line!!
On Linux it should be relative similar to get a connection.
You just have to install it correctly

Help













