This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

h1bsalary.online
h1bsalary.online

I am new to OctoberCMS and I have been trying to accomplish the following task. How do I invoke the SQL Server Stored Procedure?. Following the documentation, I used DB select, this works well when the stored procedure has a single result set. Db::select('select * from sometable where name = :name', ['name' => 'Charles']); When the stored procedure returns multiple result sets, I encounter this error.

SQLSTATE[IMSSP]: The active result for the query contains no fields. (SQL: DB.Get_Info_Wrapper#15 :employer)

Can someone please point me to what's correct method to invoke SQL Server Stored Procedures?. How do I handle stored procedure with multiple result sets?. Thanks in advance.

h1bsalary.online
h1bsalary.online

If anyone interested , SET NOCOUNT ON helped to get the first result set without errors.

SET NOCOUNT ON ; EXEC LCA.Get_GetInfo 'Parameter1' 

The problem was that the stored procedure returns a result containing the number of rows affected for each result set which triggered the exception.

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.