CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'lime_survey_235948'.. The SQL statement executed was: SELECT id FROM [lime_survey_235948] ORDER BY id desc

C:\etc\Apache\htdocs\MSSQL\framework\db\CDbCommand.php(528)

516             return $result;
517         }
518         catch(Exception $e)
519         {
520             if($this->_connection->enableProfiling)
521                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
522             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
523             $message = $e->getMessage();
524             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
525                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
526             if(YII_DEBUG)
527                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
528             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
529                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
530         }
531     }
532 
533     /**
534      * Builds a SQL SELECT statement from the given query specification.
535      * @param array $query the query specification in name-value pairs. The following
536      * query options are supported: {@link select}, {@link distinct}, {@link from},
537      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
538      * {@link limit}, {@link offset} and {@link union}.
539      * @return string the SQL statement
540      * @since 1.1.6

Stack Trace

#1
+
 C:\etc\Apache\htdocs\MSSQL\application\controllers\admin\surveyadmin.php(337): CDbCommand->query()
332             $sNewSurveyTableName = Yii::app()->db->tablePrefix."old_survey_{$postsid}_{$date}";
333             $aData['sNewSurveyTableName']=$sNewSurveyTableName;
334             //Update the auto_increment value from the table before renaming
335             $new_autonumber_start = 0;
336             $query = "SELECT id FROM ".Yii::app()->db->quoteTableName($sOldSurveyTableName)." ORDER BY id desc";
337             $result = Yii::app()->db->createCommand($query)->limit(1)->query();
338             foreach ($result->readAll() as $row)
339             {
340                 if (strlen($row['id']) > 12) //Handle very large autonumbers (like those using IP prefixes)
341                 {
342                     $part1 = substr($row['id'], 0, 12);
#4
+
 C:\etc\Apache\htdocs\MSSQL\application\core\Survey_Common_Action.php(82): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("surveyid" => "235948", "sa" => "deactivate", "iSurveyId" => "235948", "iSurveyID" => "235948"))
77             $oMethod = new ReflectionMethod($this, $sDefault);
78         }
79 
80         // We're all good to go, let's execute it
81         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
82         return parent::runWithParamsInternal($this, $oMethod, $params);
83     }
84 
85     /**
86     * Some functions have different parameters, which are just an alias of the
87     * usual parameters we're getting in the url. This function just populates
#8
+
 C:\etc\Apache\htdocs\MSSQL\application\controllers\AdminController.php(158): CController->run("survey")
153                 Yii::app()->session['redirectopage'] = Yii::app()->request->requestUri;
154 
155                 $this->redirect($this->createUrl('/admin/authentication/login'));
156             }
157 
158             return parent::run($action);
159     }
160 
161     /**
162     * Routes all the actions to their respective places
163     *
2012-10-18 09:40:59 Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 Yii Framework/1.1.10