Products Support Documentation Download
Collaboration diagram for Delete Functions:


RDM_RETCODE rdm_cursorDeleteRow (RDM_CURSOR cursor)
 Delete a row from a table. More...

Detailed Description

API for deleting a row identified by a core cursor. All the fuctions here are located in RDM DB Engine Library. Linker option:


See cursor for a more detailed description of a cursor.

Function Documentation

◆ rdm_cursorDeleteRow()

RDM_RETCODE rdm_cursorDeleteRow ( RDM_CURSOR  cursor)

#include <rdmcursorapi.h>

Delete a row from a table.

This function deletes the current row of cursor from the database.

After the row has been deleted the cursor will no longer have a current row. However it will maintain a virtual position which be the position between the rows neighboring the deleted row. The neighboring rows are dependent upon on the type of cursor.

The ability to delete a row will be based on the triggered action specified in the table definition. A row that only references other rows will be deleted and the references automatically removed. The behavior of a row that is referenced by other rows will be dependent the ON DELETE triggered action.

If the the triggered action is:

  • restrict – an error code will be returned and no rows will be deleted
  • set null – all rows that reference the row to be deleted will have their referencing foreign key columns set to NULL.
  • cascade – all of the rows that reference the row to be deleted will also be deleted. If there are any referential integrity issues with the referencing rows an error code will be returned.
Locking Requirements
Write lock on the table the cursor is based on and potentially a write lock (on delete cascade) or a read lock (on delete restrict) on any tables that have rows that reference the row to be deleted.
Return values
sOKAYNormal, successful return.
eREADONLYDatabase is read-only and cannot be updated.
eNOSTARTUPDATEAn update operation was attempted when no rdm_dbStartUpdate() is active.
eNOTLOCKEDAttempt to access a table for reading or update without proper locks.
eDBNOTOPENDatabase not open.
ePRECOMMITTEDA precommitted transaction must be committed or rolled back before further operations on this database are allowed.
eREFINTEGRITYIntegrity constraint violation.
See also
[in]cursorThe cursor whose current row will be deleted