OASQLIP_get_colattr
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function is called to retrieve additional information about a column.
int OASQLIP_get_colattr(
SQLIP_HSTMT sqlip_hsmt,
OADS_INTEGER iCol,
OADS_INTEGER iAttrType,
OADS_POINTER CharValuePtr,
OADS_UINTEGER iBufferLen,
OADS_INTEGER * piValueLen,
OADS_LEN * NumericValuePtr)
Parameters for OASQLIP_get_colattr
| Parameter | Type | Description |
| INPUT | ||
| sqlip_hsmt | SQLIP_HSTMT | Statement handle |
| iCol | OADS_INTEGER | Column number. The first column starts at 0. |
| iAttrType | OADS_INTEGER | Column attribute to return information for. See Table **Column Attributes** for information about the column attributes. |
| iBufferLen | OADS_UINTEGER | Size of the CharValuePtr buffer in bytes. |
| OUTPUT | ||
| CharValuePtr | OADS_POINTER | Character buffer of size iBufferLen to use for returning character attribute values. |
| piValueLen | OADS_INTEGER * | For character attribute types that return the length of the string in bytes. |
| NumericValuePtr | OADS_LEN * | Integer buffer to use for returning numeric attribute values. |
| RETURN | ||
| int | OADS_SUCCESS OADS_ERROR – error allocating a connection handle |
The following table describes the column attributes.
Column Attributes
| Column Attribute | Description |
| OADS_COL_ATTR_CATALOG_NAME | Return the catalog this column belongs to as an OAWCHAR string. If not applicable, return an empty string. |
| OADS_COL_ATTR_SCHEMA_NAME | Return the schema this column belongs to as an OAWCHAR string. If not applicable, return an empty string. |
| OADS_COL_ATTR_BASE_TABLE_NAME | Return the base table this column belongs to as an OAWCHAR string. If not applicable, return an empty string. |
| OADS_COL_ATTR_BASE_COLUMN_NAME | Return the base column name of the specified column as an OAWCHAR string. If not applicable, return an empty string. |
| OADS_COL_ATTR_TYPE_NAME | Return the data type name of the specified column as an OAWCHAR string. If not applicable, return an empty string. |
| OADS_COL_ATTR_DESC_HIDDEN | Return 1 if the column is hidden, otherwise return 0. |
| OADS_COL_ATTR_DESC_KEY | Return 1 if the column is a key column, otherwise return 0. |