ct_br_table

Description

Return information about browse mode tables.

Syntax

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;

Parameters

cmd

A pointer to the CS_COMMAND structure managing a client/server operation.

tabnum

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.

type

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.

buffer

A pointer to the space in which ct_br_table will place the requested information.

buflen

The length, in bytes, of the *buffer data space.

If type is CS_ISBROWSE or CS_TABNUM, pass buflen as CS_UNUSED.

outlen

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.

Returns

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.

Usage

See also

“Browse mode”, ct_br_column