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

dam_addBlockValuesToArray

This function is used to add a block of values to an array column. Block of elements values are copied from array referenced by pArrayColVal to hArray. The iStartElement parameter provides the index in hArray for the first element that is copied.
int dam_addBlockValuesToArray(
DAM_HSTMT hstmt,
DAM_HARRAY hArray,
DAM_HCOL hcol,
int iNumElements,
int iStartElement,
int iXoType,
void * pArrayColVal,
long lColValLen)
Table 51. Parameters for dam_addBlockValuesToArray
Parameter
Type
Description
IN
hstmt
DAM_HSTMT
The statement handle.
hArray
DAM_HARRAY
The array handle. Allocate using dam_allocArray.
hCol
DAM_HCOL
The column handle.
iNumElements
int
The number of elements that should be copied from pArrayColVal to array referenced by hArray.
iStartELement
int
The start index in hArray of the elements being copied
iXoType
int
Type of the data. The data can be supplied in a format that corresponds to the column's definition in the schema or in any other format and the OpenAccess SDK SQL engine will perform the required conversion.
pArrayColVal
void *
The pointer to the array of data. The C type of the array should correspond to the iXoType value. See Table 33.
IColValLen
long
The length of the data:
XO_NULL_DATA - indicates a null value for all elements that should be copied.
For VARCHAR, CHAR and NUMERIC either the length of the string or XO_NTS if the string is null terminated.
For all other data types, the length of the data
RETURN
int
DAM_SUCCESS - added the values to the array
DAM_FAILURE - error adding the values

See also

*dam_allocArray