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

dam_getOriginalQueryParamValue

This function returns the type, value, and length of the parameter specified in the original query.
int dam_getOriginalQueryParamValue(
long hstmt,
int iParam,
int * piXoType,
void ** ppParamVal,
long * plValLen)
Table 147. Properties of dam_getOriginalQueryParamValue
Parameter
Type
Description
IN
hstmt
long
The statement handle.
iParam
int *
The parameter index. Its value starts from zero.
OUT
piXoType
int *
The data type of the result value.
ppParamVal
void **
The pointer to the data is returned in this location. The C type of the data corresponds to the piXoType value. See Table 33. Use this pointer only if the plValLen is not set to XO_NULL_DATA. Do not attempt to free this data.
plValLen
long *
The length of the data pointed to by ppParamVal:
*XO_NULL_DATA - null data
*XO_NTS - null terminated string
*>= 0 - length of the data
RETURN
int
The status of the function call:
*DAM_SUCCESS - all data retrieved
*DAM_SUCCESS_WITH_RESULT_PENDING - data is partially retrieved. For the result sets of LONGVARBINARY, WLONGVARCHAR, and LONGVARCHAR types, the IP needs to call on the same parameter index repeatedly to get the complete result set. Once the complete result set is retrieved, the function returns DAM_SUCCESS.
*DAM_FAILURE - error in getting the data

See also

*dam_getOriginalQueryParamCount