srv_tabname and srv_tabcolname use a CS_BROWSEDESC structure to return information about the underlying structure of a browse mode query.
A CS_BROWSEDESC structure is defined as follows:
/*
** CS_BROWSEDESC
** The Open Server browse column description
** structure.
*/
typedef struct _cs_browsedesc
{
CS_INT status;
CS_BOOL isbrowse;
CS_CHAR origname[CS_MAX_NAME];
CS_INT orignlen;
CS_INT tablenum;
CS_CHAR tablename[CS_OBJ_NAME];
CS_INT tabnlen;
} CS_BROWSEDESC;
where:
status is a bitmask of the following symbols, OR’d together:
CS_EXPRESSION indicates the column is the result of an expression – for example, “sum*2” in the query:
select sum*2 from areas
CS_RENAMED indicates that the column’s heading is not the original name of the column. Columns will have a different heading from the column name in the database if they are the result of a query of the form:
select Author = au_lname from authors
isbrowse indicates whether or not the column can be updated in browse-mode.
A column can be updated if it is neither a timestamp column nor the result of an expression and if it belongs to a browsable table. A table is browsable if it possesses a unique index and a timestamp column.
isbrowse is set to CS_TRUE if the column can be updated and CS_FALSE if it cannot.
origname is the original name of the column in the database.
Any updates to a column must refer to it by its original name, not the heading that may have been given the column in a select statement.
orignlen is the length, in bytes, of origname.
tablenum is the number of the table to which the column belongs. The first table in a select statement’s “from” list is table number 1; the second is table number 2; and so forth.
tablename is the name of the table to which the column belongs.
tabnlen is the length, in bytes, of tablename.