ODBC database connection?

Hi, I'm using Progress database, and I'd like to know what's the DSN for it if I were to connect to it via ODBC?

In good old php, i'd done something like this


How do I do it in Yii?


$connection=new CDbConnection($dsn);

I'm sure it should be rather simple… but the combinations i tried didn't work

You need to check PHP PDO manual. However, AFAIK, PDO doesn't have good support for ODBC. And Yii AR doesn't support it.

This worked for me:

$connection=new CDbConnection(‘odbc:myDb’);


$command=$connection->createCommand(‘SELECT now() as data’);



foreach($reader as $value)


echo $value['data'];