skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_getUpdateRow
 

dam_getUpdateRow

This method gets the row of data to be used for updating the selected rows in the database. The processing for UPDATE is as for SELECT, up to the point of finding the row in the data source that matches the conditions in the query. At this point, update processing requires the update values specified in the query to be used to modify the selected row in the data source.
Related functions:
*Use dam_getFirstValueSet and dam_getNextValueSet to step through the columns of the UPDATE row.
*Use dam_getColToSet and dam_getValueToSet to obtain the corresponding column handle and the associated value.
*Use dam_describeCol method with the column handle to get the name and number of the target column.
This method, dam_getUpdateRow, should be called after dam_isTargetRow returns true to get update values based on the selected row in case the update values are derived from expressions.
long dam_getUpdateRow(
     long hstmt,
     long hTargetRow)
Table 221. Parameters for dam_getUpdateRow
Parameter
Type
Description
INPUT
hstmt
long
The statement handle of the current statement.
hTargetRow
long
The handle of the row for which the update operation will be applied. This would be a row that passes the dam_isTargetRow call.
RETURN
long
The handle to the update row. 0 is returned if an update row is not available. This handle is required by dam_getFirstValueSet. Do not call dam_freeRow on this handle to free this row. It is automatically freed by the OpenAccess SDK SQL engine.

See also

*dam_describeCol
*dam_getColToSet
*dam_getFirstValueSet
*dam_isTargetRow