dbcoltypeinfo

Description

Return precision and scale information for a regular result column of type numeric or decimal.

Syntax

DBTYPEINFO * dbcoltypeinfo(dbproc, column)
 
DBPROCESS      *dbproc;
int                        column;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

column

The number of the column of interest. The first column is number 1.

Returns

A pointer to a DBTYPEINFO structure that contains precision and scale values for a particular numeric or decimal column, or NULL if the specified column number is not in the result set.

A DBTYPEINFO structure is defined as follows:

 typedef struct typeinfo {
      DBINT    precision;
      DBINT    scale;
 } DBTYPEINFO;

If the datatype of the column is not numeric or decimal, the returned structure will contain meaningless values. Check that dbcoltype returns SYBNUMERIC or SYBDECIMAL before calling this function.

Usage

See also

dbcollen, dbcolname, dbcoltype, dbdata, dbdatlen, dbnumcols, dbprtype, dbvarylen, Types