When using the K2 blackpearl OOTB SQL Server Service Broker (Broker) to expose Stored Procedures (SProcs) you will sometimes find methods based on these stored procedures that do not expose the expected properties of the returned datasets. These cases are due to the dynamic nature of the result set schema, which prevents it from being properly mapped to the SmartObject (SmO) properties.

To get the column information, the stored procedure is executed in ADO.NET with System.Data.CommandBehavior.SchemaOnly. This is the same as executing it with SET FMTONLY option. Thus, to ensure that your SProcs results set will be properly exposed the SProc needs to be able to execute without error when SQL’s SET FMTONLY option is set to ON.

Download the PDF in the right-hand menu to view the full article.