I have created all my models for my mysql db in yii which works fine. Now I want to add an extra db which is mssql 2000. I have set up php and the pdo adapter after several hours. Now I am trying to create a model for just a single table in mssql. it does not let me. I get the following error.
The table "[xxx Geo Limited\$Fixed Asset]" for active record class "FixedAsset" cannot be found in the database.
private $_model;
2301
2302 /**
2303 * Constructor.
2304 * @param CActiveRecord $model the model instance
2305 */
2306 public function __construct($model)
2307 {
2308 $this->_model=$model;
2309
2310 $tableName=$model->tableName();
2311 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2312 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2313 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2314 if($table->primaryKey===null)
2315 {
2316 $table->primaryKey=$model->primaryKey();
2317 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2318 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2319 else if(is_array($table->primaryKey))
2320 {
2321 foreach($table->primaryKey as $name)
2322 {
2323 if(isset($table->columns[$name]))
2324 $table->columns[$name]->isPrimaryKey=true;
My model is called FixedAsset
and my table in mssql is called [xxx Geo Limited\$Fixed Asset]