I have a trouble, when to execute procedure SQL Server on laravel.
The error
SQLSTATE[IMSSP]: The active result for the query contains no fields. (SQL: EXEC pr_stop 14)
And my sript
public function stopLine(Request $request){
$stop = Engine::where([['code', $request->engine]])
->first();
$quest = [$stop->id];
DB::connection('mssql')->select('EXEC pr_stop ?', $quest);
return $this->sendResponse($stop, 'Data successfully');
}
How to fix them, because i stuck on this on using array / string data to parameter
queryfirst, but also check PDO's documentation. DB:: is basically PDO. Before you do, also check that Stored Procedure itself, because of the error messageDELETE,INSERTorUPDATEoperations before it gets around to doing theSELECT? These operations will be generating rowcount events that could be tripping up Laravel, so try usingSET NOCOUNT ON;at the top of the stored proc's code.