dam_getFirstCol
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function is used to navigate through the columns that appear in the SELECT, UPDATE, and WHERE clause of the SQL query or through the columns in the schema definition of the table. Call this function with the column types to be navigated, and then use the dam_getNextCol function to step through the list.
The dam_getFirstCol function is used to:
- Write an IP that is dynamic in that it does not hard-code any column names.
- Optimize an IP where it first builds a row with only the columns in the WHERE clause and then adds the columns in the SELECT or UPDATE part of the query only if dam_isTargetRow returns TRUE.
DAM_HCOL dam_getFirstCol(
DAM_HSTMT hstmt,
int iColType)
Parameters for dam_getFirstCol
| Parameter | Type | Description |
| IN | ||
| hstmt | DAM_HSTMT | The statement handle. |
| iColType | int | Identifies the column list to navigate. Use a bitwise OR ( | ) of the following flags to scan through columns that are in multiple categories: |
| RETURN | ||
| DAM_HCOL | A handle to the first column that has the attributes of iColType. A NULL otherwise. |