OASQLIP_get_colspec
- Last Updated: May 12, 2026
- 2 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function returns the column description.
This function is called m times where m is the number of columns returned by the OASQLIP_get_numcols method. You must return the data in the OASQLIP_get_colval method in the same format as the definition of the column. For example, if you return the description of the first column as XO_TYPE_INTEGER, then in OASQLIP_get_colval you must return the data as XO_TYPE_INTEGER.
int OASQLIP_get_colspec(SQLIP_HSTMT sqlip_hsmt,
OADS_INTEGER iCol,
OADS_INTEGER* piCardinality,
OADS_SMALLINT* piXODataType,
OADS_SMALLINT* piNullable,
OADS_POINTER* &pColName,
OADS_ULEN* piLen,
OADS_ULEN* piPrecision,
OADS_SMALLINT* piScale)
Parameters for OASQLIP_get_colspec
| Parameter | Type | Description |
| INPUT | ||
| sqlip_hsmt | SQLIP_HSTMT | The statement handle |
| iCol | OADS_INTEGER | Column number – first column starts at zero. |
| OUTPUT | ||
| piCardinality | OADS_INTEGER* | For array types, it gives the maximum number of array elements. |
| piXODataType | OADS_SMALLINT* | Data type of the column. |
| piNullable | OADS_SMALLINT* | Whether the column can have null values.When set to 1, the column can have null values.When set to 0, the column cannot have null values. |
| &pColName | OADS_POINTER* | Allocate a buffer, fill it with the column name, and return the pointer to this buffer. This buffer is used by the calling method. |
| piLen | OADS_ULEN* | Maximum length of the data in the column. Leave null for other types.CHAR and VARCHAR – maximum length of the stringNUMERIC – precision + 2Other datatypes – NULL |
| piPrecision | OADS_ULEN* | Number of digits of mantissa precision.NUMERIC - Number of digits CHAR and VARCHAR - set to same as piLen INTEGER=10, SMALLINT=5, DOUBLE=15, REAL=7,FLOAT=15DATE=10, TIME=8, TIMESTAMP=19 |
| piScale | OADS_SMALLINT* | Total number of significant digits to the right of the decimal point. Only required for NUMERIC types. |
| RETURN | ||
| int | OADS_SUCCESS OADS_ERROR – error allocating a connection handle |