Visual Basic: RDO Data Control
Deletes the current row in an updatable rdoResultset object.
The object placeholder represents an object expression that evaluates to an object in the Applies To list.
Delete removes the current row and makes it inaccessible. The deleted row is removed from the rdoResultset cursor and the database. When you delete rows from an rdoResultset, there must be a current row in the rdoResultset before you use Delete; otherwise, a trappable error is triggered.
Once you delete a row in an rdoResultset, you must reposition the current row pointer to another row in the rdoResultset before performing an operation that accesses the current row. Although you cant edit or use the deleted row, it remains current until you reposition to another row. Once you move to another row, however, you cant make the deleted row current again.
When you position to a row in your rdoResultset that has been deleted by another user, or if you delete a common row in another rdoResultset, a trappable error occurs indicating that the row has been deleted. At this point, the current row is invalid and you must reposition to another valid row. For example, if you use a bookmark to position to a deleted row, a trappable error occurs.
You can undo a row deletion if you use transactions and the RollbackTrans method assuming you use BeginTrans before using the Delete method.
Using Delete produces an error under any of the following conditions: