I am using mssql server with yii framework I created one stored-procedure , please see below code.
//Call Store procedure to get data $sql = "EXECUTE IESReportData @assessmentId=:assessmentId, @queId=:queId,@instanceId=:instanceId"; //set database connection and start the yii query builder to be executed. $connection = Yii::app()->db; $command = $connection->createCommand($sql); $command->bindValue(":assessmentId", $assessmentId); $command->bindValue(":queId", ""); $command->bindValue(":instanceId", "$instanceId"); $Reportresults = $command->queryAll();
This works fine in the ubuntu environment, but in << 25> below the error is displayed below.
Fatal error: Uncaught exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[IMSSP]: The active result for the query contains no fields.
with some R and D, I found that we need SET NOCOUNT ON , so I changed the statement below
$sql = "SET NOCOUNT ON EXECUTE IESReportData @assessmentId=:assessmentId, @queId=:queId,@instanceId=:instanceId";
This works fine in window , but gives a null result in the ubuntu environment.
Please help me.
source share