@samdark, why is it that ODBC doesn’t work with Active Record? Has it just not been implemented in Yii, or is there some inherent problem that makes this difficult or impossible?
If it is not impossible I would greatly appreciate if this were added into the next release. I cannot currently use sqlsrv, mssql, or dblib pdo drivers because they are all either windows-only, deprecated, or experimental as you can see here: http://www.php.net/manual/en/ref.pdo-dblib.php
I don’t work with ODBC so I can’t say for sure if there are problems with ODBC + PHP. As for Active Record, it needs schema driver for AR to work. These drivers are located in framework/db/ar/schema. Implementing a driver should not be difficult if you know database well and can test it. If you will implement ODBC schema, we’ll review it and include into 1.1.7.
There’s a PDO driver for ODBC so i think it should be possible to create some AR schema driver for it. On the other hand i also wonder why it hasn’t been implemented yet and if there’s some hindrance. Sometimes this is only because no developer had the oportunity to test the implementation.
So Philip if you give it a try you’ll surely receive lot of Kudos here
samdark, am I correct in thinking that if the ODBC is connecting to a DBRM for which Yii does have a schema, you can make it work by adding ‘odbc’ to the $driverMap array of CDbConnection?
For example, if you configure your ODBC that it connects to an external MySQL database, you add ‘odbc’=>‘CMysqlSchema’. Of course, most people would enable external connections to that MySQL database so you can link directly to it using the MySQL PDO driver, but I can imagine there can be usecases where a database can only be connected to using ODBC.