skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_getColCount
 

dam_getColCount

This method is used to retrieve the number of columns in the various categories. Call this method to retrieve the number of columns in any one category or in multiple categories. Use this method to quickly check if columns of a specific type exist, and if so, how many.
int dam_getColCount(
    long   hstmt,
    int    iColType,
    xo_int piColCount)
Table 166. Parameters for dam_getColCount
Parameter
Type
Description
INPUT
hstmt
long
The statement handle.
iColType
int
Identifies the column type. Use a bitwise OR ( | ) of the following flags to scan through columns that are in multiple categories:
DAM_COL_IN_SCHEMA - list of all columns as defined in the schema database.
DAM_COL_IN_RESULT - list of columns that are part of the result set.
DAM_COL_IN_CONDITION - list of columns that are in the where clause.
DAM_COL_IN_USE - list of columns that are either part of the result or are in the where clause.
OUTPUT
piColCount
xo_int
The number of columns of the specified iColType. Create and pass in an object of type xo_int.
RETURN
int
The status of the method execution:
DAM_SUCCESS - valid column count returned.
DAM_FAILURE - Error due to invalid iColType.