Results

When a Client-Library command executes on a server, it generates various types of results, which are returned to the application that sent the command. The result types are as follows:

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 and cursor row result sets 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 ct_results, which indicates the type of result available by setting *result_type.

ct_results sets *result_type to CS_CMD_DONE to indicate that the results of a “logical command” have been completely processed. A logical command is generally considered to be any Client-Library command defined through ct_command, ct_dynamic, or ct_cursor. Exceptions to this rule are documented in “ct_results and logical commands”.

Some commands, for example a language command containing a Transact-SQL update statement, do not generate results. ct_results sets *result_type to CS_CMD_SUCCEED or CS_CMD_FAIL to indicate the status of a command that does not return results.