SQLSetPos

The SQLSetPos function allows an application to set the cursor position in a row set and perform an operation based on that position. The function takes as input the statement handle, the position of the row in the row set (on which the operation is to be performed), the operation type, and an additional parameter that describes how to lock the row after performing the operation.

The irow argument specifies the number of the row (in the row set) on which to perform the operation. If irow is 0, the operation applies to the entire row set.

The following operations are supported:

SQL_ADD
SQL_DELETE
SQL_POSITION
SQL_REFRESH
SQL_UPDATE

The following lock type is supported:

SQL_LOCK_NO_CHANGE

Note that if a row is marked as deleted (SQL_ROW_DELETED), and later a row is inserted with the same key value(s) as the old row, an SQL_REFRESH operation will show the new row (SQL_ROW_SUCCESS) in the old position.