TApxPhonebook.DeleteEntry

TApxPhonebook

procedure DeleteEntry(EntryName : string);

Deletes an entry from the database.

Use the DeleteEntry method to delete an entry from the phone book database. EntryName is the name of the entry to delete. If the entry is found, the entry is deleted. If the entry is not found, the ecEntryNotFound exception is raised.

The following example demonstrates how to verify that an entry is present before deleting it:

var
  EntryToDelete : string;
...
if ApxPhoneBook1.EntryNames.IndexOf(EntryToDelete) > -1 then
  ApxPhoneBook1.DeleteEntry(EntryToDelete);
...

See also: EntryNames