Result types

Client-Library restricts the routines that can be called based on the result type if a command is in one of the following states:

Table A-5 briefly describes the different result types:

Table A-5: Result type definitions

Result type

Meaning

Regular row results

Zero or more rows of tabular data generated by the execution of a Transact-SQL select statement.

Cursor row results

Zero or more rows of tabular data generated when an application executes a Client-Library cursor-open command.

Parameter results

A single row of message parameters or stored procedure return parameters.

Stored procedure return status results

A single row containing a single value (a return status).

Message results

No data is available, but an application can call ct_res_info to get the message’s ID.

Compute row results

A single row of tabular data with a number of columns equal to the number of columns listed in the compute clause that generated the compute row.

CS_CMD_DONE

The results of a command have been completely processed.

CS_CMD_SUCCEED

A command that returns no data (such as a language command containing a Transact-SQL insert statement) was successful.

CS_CMD_FAIL

The server encountered an error while executing a command.

Regular row format results

Format information for an associated regular row result set.

Compute row format results

Format information for an associated compute row result set.

Describe results

Descriptive information returned as the result of a dynamic SQL describe input or output command.

Extended error data results

A single row of extended error data.

Notification results

A single row of arguments with which a registered procedure was called.

See Chapter 6, “Writing Results-Handling Code” for detailed information about the various types of results.