求助SQLSERVER数据库连接问题 [ 新手入门 ]
配置好之后抛出的信息是description sourcefile 然后就是一堆问题描述
CDbException
Description
Source File
E:\AppServ\www\yii\framework\gii\generators\model\ModelCode.php(45)
00033: )); 00034: } 00035: 00036: public function requiredTemplates() 00037: { 00038: return array( 00039: 'model.php', 00040: ); 00041: } 00042: 00043: public function init() 00044: { 00045: if(Yii::app()->db===null) 00046: throw new CHttpException(500,'An active "db" connection is required to run this generator.'); 00047: $this->tablePrefix=Yii::app()->db->tablePrefix; 00048: parent::init(); 00049: } 00050: 00051: public function prepare() 00052: { 00053: $this->files=array(); 00054: $templatePath=$this->templatePath; 00055: 00056: if(($pos=strrpos($this->tableName,'.'))!==false) 00057: { Stack Trace
#0 E:\AppServ\www\yii\framework\db\CDbConnection.php(242): CDbConnection->open() #1 E:\AppServ\www\yii\framework\db\CDbConnection.php(221): CDbConnection->setActive(true) #2 E:\AppServ\www\yii\framework\base\CModule.php(363): CDbConnection->init() #3 E:\AppServ\www\yii\framework\base\CModule.php(86): CModule->getComponent('db') #4 E:\AppServ\www\yii\framework\gii\generators\model\ModelCode.php(45): CModule->get('db') #5 E:\AppServ\www\yii\framework\web\CFormModel.php(40): ModelCode->init() #6 E:\AppServ\www\yii\framework\gii\CCodeGenerator.php(149): CFormModel->construct() #7 E:\AppServ\www\yii\framework\gii\CCodeGenerator.php(61): CCodeGenerator->prepare() #8 E:\AppServ\www\yii\framework\web\actions\CInlineAction.php(32): CCodeGenerator->actionIndex() #9 E:\AppServ\www\yii\framework\web\CController.php(300): CInlineAction->run() #10 E:\AppServ\www\yii\framework\web\CController.php(278): CController->runAction(Object(CInlineAction)) #11 E:\AppServ\www\yii\framework\web\CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array) #12 E:\AppServ\www\yii\framework\web\CWebApplication.php(320): CController->run('') #13 E:\AppServ\www\yii\framework\web\CWebApplication.php(120): CWebApplication->runController('gii/model') #14 E:\AppServ\www\yii\framework\base\CApplication.php(135): CWebApplication->processRequest() #15 E:\AppServ\www\dataunit\index.php(12): CApplication->run() #16 {main} 2011-09-30 08:03:09 Apache/2.2.8 (Win32) PHP/5.2.6 Yii Framework/1.1.2
共 0 条回复
lyy
最后登录:1970-01-01
在线时长:0小时0分
- 粉丝0
- 金钱30
- 威望0
- 积分30