CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[22003]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The conversion of the nvarchar value '33931687481' overflowed an int column.. The SQL statement executed was: SELECT TOP 1 * FROM [dbo].[lime_questions] [t] WHERE [t].[qid]=:yp0 AND [t].[language]=:yp1 AND [t].[sid]=:yp2

.\limesurvey\framework\db\CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#2
+
 .\limesurvey\application\models\LSActiveRecord.php(73): CActiveRecord->query(CDbCriteria, false)
68      * @since 1.1.7
69      */
70     protected function query($criteria, $all = false, $asAR = true)
71     {
72         if ($asAR === true) {
73             return parent::query($criteria, $all);
74         } else {
75             $this->beforeFind();
76             $this->applyScopes($criteria);
77             if (!$all) {
78                 $criteria->limit = 1;
#4
+
 .\limesurvey\application\controllers\admin\checkintegrity.php(537): CActiveRecord->findByAttributes(array("qid" => "33931687481", "language" => "en", "sid" => "152625"))
532                             if ((string) intval($sQID) !== $sQID) {
533                                 throw new \Exception('sQID is not an integer: ' . $sQID);
534                             }
535 
536                             // Here, we get the question as defined in backend
537                             $oQuestion = Question::model()->findByAttributes([ 'qid' => $sQID , 'language' => $oSurvey->language, 'sid' => $oSurvey->sid ]);
538                             if (is_a($oQuestion, 'Question')){
539 
540                                 // We check if its GID is the same as the one defined in the column name
541                                 if ($oQuestion->gid != $sGid){
542 
#5
+
 .\limesurvey\application\controllers\admin\checkintegrity.php(40): CheckIntegrity->_checkintegrity()
35         Yii::app()->loadHelper('surveytranslator');
36     }
37                                                                              
38     public function index()
39     {
40         $aData = $this->_checkintegrity();
41 
42 
43         $aData['fullpagebar']['returnbutton']['url'] = 'admin/index';
44         $aData['fullpagebar']['returnbutton']['text'] = gT('Return to admin home');
45 
2021-07-21 10:13:31 Microsoft-IIS/10.0 Yii Framework/1.1.24-dev