Callable routines in each command state

Table A-2 maps each command state to the Client-Library routines that an application can call while in that state. It also identifies the state of the command after the routine has completed.

Table A-2: Callable routines at each command state

Beginning state

Callable routines

Resulting command state

Idle

ct_cancel(CS_CANCEL_ALL) ct_cancel(CS_CANCEL_ATTN)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_drop

Idle.

ct_cmd_props

Idle.

Idle

ct_command

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_cursor

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_dynamic

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_dyndesc

Idle.

ct_dynsqlda

Idle.

ct_sendpassthru

  • In send passthrough, if CS_PASSTHRU_MORE.

  • Command sent, if CS_PASSTHRU_EOM.

  • Undefined, if CS_FAIL.

Command initiated

ct_cancel(CS_CANCEL_ALL)

  • Idle, if CS_SUCCEED.

  • Command initiated, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

Command initiated.

ct_cmd_props

Command initiated.

ct_cursor

Command initiated.

ct_data_info(CS_SET)

Command initiated.

ct_dyndesc

Command initiated.

ct_dynsqlda

Command initiated.

ct_param

Command initiated.

ct_setparam

Command initiated.

ct_send

  • Command sent, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_send_data

  • Command initiated, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

Command sent

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Command sent, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Command sent.

ct_dynsqlda

Command sent.

ct_dyndesc

Command sent.

ct_recvpassthru

  • In receive passthrough, if CS_PASSTHRU_MORE.

  • Idle, if CS_PASSTHRU_EOM, CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_results

  • Non-fetchable results available, if CS_SUCCEED and *result_type equals CS_MSG_RESULT, CS_CMD_SUCCEED, CS_CMD_FAIL, CS_CMD_DONE, CS_ROWFMT_RESULT, CS_COMPUTEFMT_RESULT, or CS_DESCRIBE_RESULT.

  • Fetchable results, if CS_SUCCEED and *result_type equals CS_ROW_RESULT, CS_COMPUTE_RESULT, CS_PARAM_RESULT, or CS_STATUS_RESULT.

  • Fetchable cursor results, if CS_SUCCEED and *result_type equals CS_CURSOR_RESULT.

  • Idle, if CS_CANCELED or CS_END_RESULTS.

  • Undefined, if CS_SUCCEED and *result_type equals CS_CMD_FAIL.

Non-fetchable results available

ct_br_column

Non-fetchable results available.

ct_br_table

Non-fetchable results available.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Non-fetchable results available, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

Non-fetchable results available

ct_cancel(CS_CANCEL_CURRENT)

  • Non-fetchable results available, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Non-fetchable results available.

ct_compute_info

Non-fetchable results available.

ct_describe

Non-fetchable results available.

ct_dyndesc

Non-fetchable results available.

ct_dynsqlda

Non-fetchable results available.

ct_getformat

Non-fetchable results available.

ct_res_info

Non-fetchable results available.

ANSI-style cursor end-data

ct_results

  • Fetchable results, if CS_SUCCEED and *result_type equals CS_ROW_RESULT, CS_COMPUTE_RESULT, CS_PARAM_RESULT, or CS_STATUS_RESULT.

  • Fetchable cursor results, if CS_SUCCEED and *result_type equals CS_CURSOR_RESULT.

  • Idle, if CS_CANCELED or CS_END_RESULTS.

  • Undefined, if CS_FAIL.

ct_bind

ANSI-style cursor end-data.

ct_br_column

ANSI-style cursor end-data.

ct_br_table

ANSI-style cursor end-data.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • ANSI-style cursor end-data if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

ANSI-style cursor end-data.

ct_cmd_props

ANSI-style cursor end-data.

ct_compute_info

ANSI-style cursor end-data.

ct_describe

ANSI-style cursor end-data.

ct_dyndesc

ANSI-style cursor end-data.

ct_dynsqlda

ANSI-style cursor end-data.

ct_fetch

  • ANSI-style cursor end-data, if CS_END_DATA.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ANSI-style cursor end-data

ct_getformat

ANSI-style cursor end-data.

ct_res_info

ANSI-style cursor end-data.

ct_results

  • Non-fetchable results available, if CS_SUCCEED and *result_type equals CS_MSG_RESULT or CS_CMD_DONE.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Fetchable results

ct_bind

Fetchable results.

ct_br_column

Fetchable results.

ct_br_table

Fetchable results.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetchable results, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Non-fetchable results available, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetchable results.

ct_compute_info

Fetchable results.

ct_describe

Fetchable results.

ct_dyndesc

Fetchable results.

ct_dynsqlda

Fetchable results.

ct_fetch

  • Fetching results, if CS_SUCCEED or CS_ROW_FAIL.

  • Non-fetchable results available, if CS_END_DATA.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_getformat

Fetchable results.

ct_res_info

Fetchable results.

Fetchable cursor results

ct_bind

Fetchable cursor results.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetchable cursor results, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Non-fetchable results available, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetchable cursor results.

ct_cursor

  • Fetchable nested command, if CS_SUCCEED.

  • Fetchable cursor results, if CS_FAIL.

ct_describe

Fetchable cursor results.

ct_dyndesc

Fetchable cursor results.

ct_dynsqlda

Fetchable cursor results.

ct_fetch

  • Fetching cursor results, if CS_SUCCEED or CS_ROW_FAIL.

  • Idle, if CS_CANCELED.

  • Non-fetchable results available, if CS_END_DATA.

  • ANSI-style cursor end-data, if CS_END_DATA and CS_ANSI_BINDS property is set.

  • Undefined, if CS_FAIL.

ct_getformat

Fetchable cursor results.

ct_res_info

Fetchable cursor results.

Fetchable nested command

ct_cancel(CS_CANCEL_ALL)

  • Fetchable cursor results, if CS_SUCCEED.

  • Fetchable nested command, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetchable nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetchable nested command.

ct_dyndesc

Fetchable nested command.

ct_dynsqlda

Fetchable nested command.

ct_param

Fetchable nested command.

ct_setparam

Fetchable nested command.

ct_send

  • Sent fetchable nested, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Sent fetchable nested

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Sent fetchable nested, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Sent fetchable nested.

ct_results

  • Processing fetchable nested command, if CS_CMD_SUCCEED or CS_CMD_FAIL.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Processing fetchable nested command

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Processing fetchable nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Processing fetchable nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Processing fetchable nested command.

ct_dyndesc

Processing fetchable nested command.

ct_dynsqlda

Processing fetchable nested command.

ct_res_info

Processing fetchable nested command.

ct_results

  • Fetchable cursor results, if CS_END_RESULTS.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Fetching results

ct_bind

Fetching results.

ct_br_column

Fetching results.

ct_br_table

Fetching results.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetching results, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Non-fetchable results available, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetching results.

ct_compute_info

Fetching results.

ct_data_info(CS_GET)

Fetching results.

ct_describe

Fetching results.

ct_dyndesc

  • Fetching results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Fetching results

ct_dynsqlda

  • Fetching results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_fetch

  • Fetching results, if CS_SUCCEED.

  • Non-fetchable results available, if CS_END_DATA.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_get_data

  • Fetching results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_getformat

Fetching results.

ct_res_info

Fetching results.

Fetching cursor results

ct_bind

Fetching cursor results.

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetching cursor results, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Non-fetchable results available, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetching cursor results.

ct_cursor

  • Fetching nested command, if CS_SUCCEED.

  • Fetching cursor results, if CS_FAIL.

ct_describe

Fetching cursor results.

ct_dyndesc

  • Fetching cursor results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_dynsqlda

  • Fetching cursor results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_fetch

  • Fetching cursor results, if CS_SUCCEED.

  • Non-fetchable results available, if CS_END_DATA.

  • ANSI-style cursor end-data, if CS_END_DATA and CS_ANSI_BINDS property is set.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_get_data

  • Fetching cursor results, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_getformat

Fetching cursor results.

ct_keydata

Fetching cursor results.

ct_res_info

Fetching cursor results.

Fetching nested command

ct_cancel(CS_CANCEL_ALL)

  • Fetching cursor results, if CS_SUCCEED.

  • Fetching nested command, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Fetching nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Fetching nested command.

ct_dyndesc

Fetching nested command.

ct_dynsqlda

Fetching nested command.

ct_param

Fetching nested command.

ct_setparam

Fetching nested command.

ct_send

  • Sent fetching nested command, if CS_SUCCEED.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Sent fetching nested command

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Sent fetching nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Sent fetching nested command.

ct_results

  • Processing fetching nested command, if CS_CMD_SUCCEED or CS_CMD_FAIL.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Processing fetching nested command

ct_cancel(CS_CANCEL_ALL)

  • Result set canceled, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Processing fetching nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_CURRENT)

  • Processing fetching nested command, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

Processing fetching nested command.

ct_dyndesc

Processing fetching nested command.

ct_dynsqlda

Processing fetching nested command.

ct_keydata

Processing fetching nested command.

ct_res_info

Processing fetching nested command.

ct_results

  • Processing fetching nested command, if CS_SUCCEED.

  • Fetching cursor results, if CS_END_RESULTS.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.

Result set canceled

ct_cancel(CS_CANCEL_ALL)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_drop

Idle.

ct_cmd_props

Idle.

ct_command

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_cursor

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_dynamic

  • Command initiated, if CS_SUCCEED.

  • Idle, if CS_FAIL.

ct_dyndesc

  • Idle, if CS_SUCCEED, CS_ROW_FAIL, or CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_dynsqlda

  • Idle, if CS_SUCCEED, CS_ROW_FAIL, or CS_CANCELED.

  • Undefined, if CS_FAIL.

ct_results

  • Result set canceled, if CS_SUCCEED or CS_FAIL.

  • Idle, if CS_CANCELED.

ct_sendpassthru

Result set canceled.

Undefined

ct_cancel(CS_CANCEL_ALL)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

Undefined.

ct_cmd_props

Undefined.

ct_dyndesc

Undefined.

ct_dynsqlda

Undefined.

In receive passthrough

ct_cancel(CS_CANCEL_ALL)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • In receive passthrough, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

In receive passthrough.

ct_recvpassthru

  • Idle, if CS_PASSTHRU_EOM or CS_CANCELED.

  • Undefined, if CS_FAIL.

In send passthrough

ct_cancel(CS_CANCEL_ALL)

  • Idle, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cancel(CS_CANCEL_ATTN)

  • In send passthrough, if CS_SUCCEED.

  • Undefined, if CS_FAIL.

ct_cmd_props

In send passthrough.

ct_sendpassthru

  • Command sent, if CS_PASSTHRU_EOM.

  • Idle, if CS_CANCELED.

  • Undefined, if CS_FAIL.