简体   繁体   中英

Gii model generator error - Table does not exist - Yii framework and SQL Server 2000

The main configuration of the file ( main.php ) is as follows:

'class'=>'CDbConnection',
'connectionString'=>'mssql:host=127.0.0.1;dbname=TestSQL'

I can connect to the database successfully, but when generating a model from Yii Code Generator it tells me that the table does not exist.

Table exists? Gii generates a model based on table. First you need to create a table. If you use console version gii, then to need manage console.php config.

Found Solution 将表名重命名为不同的名称并使用 gii 重新生成模型,事情又开始工作了!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM