CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Cannot insert explicit value for identity column in table 'lime_questions' when IDENTITY_INSERT is set to OFF.. The SQL statement executed was: INSERT INTO [dbo].[lime_questions] ([parent_qid], [sid], [gid], [type], [title], [other], [scale_id], [same_default], [qid], [question], [preg], [help], [mandatory], [question_order], [language]) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14)

E:\WebSite\limesurvey\framework\db\CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#1
+
 E:\WebSite\limesurvey\application\controllers\admin\questions.php(1253): CActiveRecord->insert()
1248                         $arQuestion->help = $basesettings['help'];
1249                         $arQuestion->other = $basesettings['other'];
1250                         $arQuestion->mandatory = $basesettings['mandatory'];
1251                         $arQuestion->question_order = $basesettings['question_order'];
1252                         $arQuestion->language = $key;
1253                         $arQuestion->insert();
1254                     }
1255                 }
1256 
1257                 $eqresult = Question::model()->with('groups')->together()->findByAttributes(array(
1258                     'sid' => $surveyid,
#4
+
 E:\WebSite\limesurvey\application\core\Survey_Common_Action.php(83): CAction->runWithParamsInternal(questions, ReflectionMethod, array("r" => "admin/questions/sa/editquestion/surveyid/236656/gid/10712/qid/30...", "sa" => "editquestion", "surveyid" => "236656", "gid" => "10712", ...))
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
#8
+
 E:\WebSite\limesurvey\application\controllers\AdminController.php(165): CController->run("questions")
160                     $this->redirect(array('/admin/authentication/sa/login'));
161                 }
162             }
163         }
164 
165         return parent::run($action);
166     }
167 
168     /**
169      * Routes all the actions to their respective places
170      *
2021-03-25 15:43:11 Microsoft-IIS/10.0 Yii Framework/1.1.22-dev