skip to main content
Table functions : Example : Accessing CURVALUE arguments from OAIP_execute
 

Accessing CURVALUE arguments from OAIP_execute

To access CURVALUE arguments from OAIP_execute:
In OAIP_execute, call dam_describeTableFunction() to get the table function arguments.
int OAIP_execute(IP_HDBC hdbc,DAM_HSTMT hstmt,int iStmtType,DAM_HCOL hSearchCol, int *piNumResRows)
...
dam_describeTableFunction(pStmtDA->dam_hstmt, NULL, NULL, NULL, NULL, NULL, &hValExpList, &iArgCount);
Use the obtained value expression list to get each individual argument passed to the table function using the following APIs.
DAM_HVALEXP dam_getFirstValExp(DAM_HVALEXP_LIST hValExpList)
DAM_HVALEXP dam_getNextValExp(DAM_HVALEXP_LIST hValExpList)
Note: You can use dam_describeTableFunction() to get the parameter list, parameter count, and other information, such as the table function owner an qualifier.