Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Deleting Records

To delete a record, you need to perform the following actions:

  1. Read the record from disk by calling one of the CTRecord.First(), CTRecord.Last(), CTRecord.Next(), CTRecord.Prev(), CTRecord.SeekRecord(), CTRecord.Find() or CTRecord.FindTarget() methods.
  2. Delete the record by calling CTRecord.Delete():

// delete the first record

ARecord.First();


// delete the record

try

{

ARecord.Delete();

}

catch (CTException err)

{

Console.Write("Delete record failed with error {0}\n", err.GetErrorCode());

}

TOCIndex