Results

Description

When a client request executes a server procedure or transaction, it can generate various types of result sets that are returned to the client application:

NoteThese are the only result types supported by Open ClientConnect. Although additional result types are supported by Open Client for other platforms, they are not supported on the mainframe.

Results are returned to an application in the form of result sets. A result set contains only a single type of result data. Regular row result sets can contain multiple rows of data, but other types of result sets contain at most a single row of data.

An application processes results by calling CTBRESULTS, which indicates the type of result available by setting the RESULT_TYP argument. The application calls CTBRESULTS once for each result row. CTBRESULTS returns CS_CMD_DONE in RESULT_TYP to indicate that a result set processed completely.

Some requests, such as a language request containing a Transact-SQL update statement, do not generate results. CTBRESULTS returns CS_CMD_SUCCEED to indicate the success of a request that does not return results.