Reply generation of a SQL stored procedure

In addition to the returned Update Count and Results Set Count objects, two other types of results can be returned from a stored procedure. These result types are return code and OUT parameter values.

Similar to the SQL statement reply generation logic, the Database Outbound driver retrieves all the results of a stored procedure.

Only result set objects are saved into message content. The remaining results are saved into DRIVERCTL as a keyed list where the key is the stored procedure’s name.

For example:

Reply message:
msgDriverControl: {sp_dbp_in2out2 {{_CLUPDATECOUNT_ 1} {_CLRSCOUNT_ 1} {_CLRC_ 100} {@output1 test1} {@output2 600}}} 
message: ''
  • {_CLUPDATECOUNT_ 1} indicates 1 row is updated in the outbound stored procedure sp_dbp_in2out2.
  • {_CLRSCOUNT_ 0} indicates no result set is returned from the outbound stored procedure sp_dbp_in2out2.
  • {_CLRC_ 100} indicates the returned code of the outbound stored procedure sp_dbp_in2out2 is 100.
  • {@output1 test1} indicates the outbound stored procedure sp_dbp_in2out2 returns test1 for output variable @output1.
  • {@output2 600} indicates the outbound stored procedure sp_dbp_in2out2 returns 600 for output variable @output2.