Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_addxxxValToRow

  • Last Updated: May 12, 2026
  • 2 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

These methods are used to build up a row by adding values for columns, one at a time. These methods require all data to be passed in using the same format as the column definition in the schema database or in any format for which a conversion is supported. Please refer to the following data conversion table:

https://documentation.progress.com/output/DataDirect/collateral/dataconversiontable.html

NULL data is added by specifying the XO_NULL_DATA value flag for the column value length.

These methods copy data from the user-supplied buffer to its internal buffers; therefore, the IP can free the memory associated with the input buffer (ColVal).

For a Java IP, there are data type-specific methods.

int dam_addBigIntValToRow(
    long hstmt,
    long hRow,
    long hCol,
    long colVal,
    int lColValLen)

int dam_addBinaryValToRow(
    long   hstmt, 
    long   hRow, 
    long   hCol, 
    byte[] ColVal,
    int    lColValLen)

int dam_addBitValToRow(
    long    hstmt,
    long    hRow,
    long    hCol,
    boolean colVal,
    int     lColValLen)

int dam_addCharValToRow(
    long   hstmt, 
    long   hRow,
    long   hCol, 
    String colVal, 
    int    lColValLen)

int dam_addWCharValToRow(
    long   hstmt, 
    long   hRow,
    long   hCol, 
    String colVal, 
    int    lColValLen)

int dam_addDoubleValToRow(
    long   hstmt, 
    long   hRow,
    long   hCol, 
    double colVal, 
    int    lColValLen)

int dam_addFloatValToRow(
    long  hstmt, 
    long  hRow,
    long  hCol, 
    float colVal, 
    int   lColValLen)

int dam_addIntValToRow(
    long hstmt, 
    long hRow,
    long hCol, 
    int  colVal, 
    int  lColValLen)

int dam_addShortValToRow(
    long  hstmt, 
    long  hRow,
    int   hCol, 
    short colVal, 
    int   lColValLen)

int dam_addTimeStampValToRow(
    long  hstmt, 
    long  hRow,
    long  hCol, 
    xo_tm colVal, 
    int   lColValLen)

int dam_addTinyIntValToRow(
    long hstmt,
    long hRow,
    long hCol,
    byte colVal,
    int lColValLen)

Parameters for dam_addxxxValToRow

Parameter Type Description
INPUT
hstmt long The statement handle.
hRow long The row handle.
hCol long The column handle.
ColVal depends on the method used The Java type of the data should correspond to the iXoType value. See Table How the methods for Java return a value as an object
lColValLen int The length of the data.
XO_NULL_DATA - indicates a null value
For VARCHAR, CHAR, WVARCHAR, WCHAR, and NUMERIC either the length of the number of characters or XO_NTS to add the entire string.
For all other data types, 0 or any value other than XO_NULL_DATA.
Note: The length value is required to allow OpenAccess SDK to validate that the correct size of data is passed in for the iXoType.
RETURN
int DAM_SUCCESS - added the value to the row.
DAM_FAILURE - error adding the value.

The LONGVARBINARY, LONGVARCHAR, and WLONGVARCHAR type of data (character data or binary data) can be provided to the OpenAccess SDK SQL engine in segments by calling dam_addxxxValToRow multiple times. In each call, include the data and its length. However, for LONGVARBINARY, the data must be provided as binary data.

See also

TitleResults for “How to create a CRG?”Also Available inAlert