skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_getOrderByCol
 

dam_getOrderByCol

This function returns the column name and position in the schema for the specified ORDER BY column.
int dam_getOrderByCol(
DAM_HSTMT hstmt,
int iOrderByColNum,
int * piColNum,
char * pColName,
int * piSortOrder)

int dam_getOrderByColW(
DAM_HSTMT hstmt,
int iOrderByColNum,
int * piColNum,
OAWCHAR * pColName,
int * piSortOrder)
Table 145. Properties of dam_getOrderByCol
Parameter
Type
Description
IN
hstmt
DAM_HSTMT
Statement handle.
iOrderByColNum
int
The number of the ORDER BY column about which to return information. Valid numbers are 0 - (the value returned from dam_getInfo (DAM_INFO_ORDER_BY_OPTIMIZABLE) -1).
OUT
piColNum
int *
Column number as defined in the schema database
pColName
char *
OAWCHAR *
Column name as defined in the schema database. Pass in a buffer of 128 characters.
piSortOrder
int *
Sort order for the column:
SQL_ORDER_ASC - Ascending
SQL_ORDER_DESC - Descending
RETURN
int
Status of the call:
DAM_SUCCESS - on success
DAM_FAILURE - wrong value for iOrderByColNum

See also

*dam_getInfo