Developer Documentation Library > Data Model > Extending the UNICOM Intelligence Data Model > Creating a CDSC > Handling hierarchical data > VDATA and HDATA examples > Implementing DELETE for VDATA
 
Implementing DELETE for VDATA
When the Provider deletes existing data records through the CDSC, it obtains a Command object and sets the data binding to one or more columns in the table. The Provider moves the Command object to the row that is to be deleted by calling the MoveNext and/or MoveFirst subroutines. The Provider calls Delete on the Command object and the CDSC deletes the record.
To delete the row for the extra person that was added to our example VDATA table, the Provider can reuse the existing Command. After calling the MoveLast (if supported) subroutine, the Provider can delete the last row in the table by calling the Delete subroutine. The data now appears as it was before the new row was added.
Like updating records, the Delete command can operate on multiple records in a single pass through the data. Note that after the Delete method is called on a Command object, the CDSC should move on to the next record, loading its data into the Value objects, the same as if MoveNext had been called. If the deleted record was the last one, the CDSC should set the Command property EOF to true.
See also
VDATA and HDATA examples