Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CDbException
- CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert explicit value for identity column in table 'lime_assessments' when IDENTITY_INSERT is set to OFF.. The SQL statement executed was: INSERT INTO [lime_assessments] ([id], [sid], [scope], [gid], [name], [minimum], [maximum], [message], [language]) VALUES (:id, :sid, :scope, :gid, :name, :minimum, :maximum, :message, :language)
- D:\Apps\2561_BetaSurvey\web\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
- #0
- +
- –
- D:\Apps\2561_BetaSurvey\web\framework\db\CDbCommand.php(1250): CDbCommand->execute(array(":id" => "161", ":sid" => "41366", ":scope" => "T", ":gid" => "8790", ...))
- 1245 }
- 1246 }
- 1247 $sql='INSERT INTO ' . $this->_connection->quoteTableName($table)
- 1248 . ' (' . implode(', ',$names) . ') VALUES ('
- 1249 . implode(', ', $placeholders) . ')';
- 1250 return $this->setText($sql)->execute($params);
- 1251 }
- 1252
- 1253 /**
- 1254 * Creates and executes an UPDATE SQL statement.
- 1255 * The method will properly escape the column names and bind the values to be updated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement