Как получить сообщение RAISERROR от хранимой процедуры на сервере SQL в Zend Framework 2

Я выполняю хранимые процедуры SQL Server, и в результате я получаю две вещи, результат и сообщение, когда я выполняю его из Sql Server Management Studio. Но я не знаю, как получить это сообщение в Zend Framework 2, когда я выполняю хранимую процедуру?

  class myController{
public function indexAction() {
$getResource = $this->fetchTransStatus('123');
$obj = sqlsrv_fetch_array($getResource, SQLSRV_FETCH_ASSOC);
// $obj will give the result coming from database,
// but i am not getting the message coming from stored procedure
// which i it is sending through RAISERROR
}
public function fetchTransStatus($data = null)
{
$procedure = 'procedure_name';
$params = " @param1 = $data, @param2 = 1";
$stmt = $this->tableGateway->getAdapter()->createStatement();
$stmt->prepare("EXEC $procedure $params");
$result = $stmt->execute();
return $result->getResource();
}
}

Как я получу сообщение RAISERROR от хранимой процедуры в Zend Framework 2?

2

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector