Return information about browse mode tables.
CS_RETCODE ct_br_table(cmd, tabnum, type, buffer, buflen, outlen) CS_COMMAND *cmd; CS_INT tabnum; CS_INT type; CS_VOID *buffer; CS_INT buflen; CS_INT *outlen;
A pointer to the CS_COMMAND structure managing a client/server operation.
The number of the table of interest. The first table in a select statement’s from list is table number 1, the second number is 2, and so forth.
The type of information to return. The following table lists the symbolic values for type:
Value of type |
ct_br_table return value |
*buffer set to |
---|---|---|
CS_ISBROWSE |
Whether or not the table is browsable. A table is browsable if it has a unique index and a timestamp column. |
CS_TRUE or CS_FALSE |
CS_TABNAME |
The name of the table whose number is tabnum. |
A string value |
CS_TABNUM |
The number of tables named in the browse-mode select. If type is CS_TABNUM, pass tabnum as CS_UNUSED. |
An integer value. |
A pointer to the space in which ct_br_table will place the requested information.
The length, in bytes, of the *buffer data space.
If type is CS_ISBROWSE or CS_TABNUM, pass buflen as CS_UNUSED.
A pointer to an integer variable.
If supplied, ct_br_table sets *outlen to the length, in bytes, of the requested information.
If the requested information is larger than buflen bytes, the call will fail. The application can use the value of *outlen to determine how many bytes are needed to hold the information.
ct_br_table returns the following values:
Return value |
Meaning |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
CS_BUSY |
An asynchronous operation is already pending for this connection. For more information, see “Asynchronous programming”. |
ct_br_table fails if the current result set was not generated by a select...for browse language command.
ct_br_table returns either the number of tables named in the select statement or information about a particular table.
A table is browsable if it has a unique index and a timestamp column.
It is an error to call ct_br_table if browse-mode information is not available. Generally, browse mode information is available if the current result set is a CS_ROW_RESULT result set that was generated by a select...for browse.
Before calling ct_br_table, an application can call ct_res_info with type as CS_BROWSE_INFO to check whether browse mode information is available.