---
name: "DlpDeleteRecord"
section: "3"
platform: "linux"
package: "coldsync"
version: "3.0+pre3-3"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/DlpDeleteRecord"
---

# DlpDeleteRecord(3)

delete a record or resource from a PalmOS device

## NAME

**DlpDeleteRecord**, **DlpDeleteResource** – delete a record or resource from a PalmOS device

## LIBRARY

*libpconn*

## SYNOPSIS

**#include \<palm.h\>**

**#include \<pconn/pconn.h\>**

*int*\

**DlpDeleteRecord**(*PConnection \*pconn*, *const ubyte handle*, *const ubyte flags*, *const udword recid*);

*int*\

**DlpDeleteResource**(*PConnection \*pconn*, *const ubyte handle*, *const ubyte flags*, *const udword type*, *const uword id*);

## DESCRIPTION

**DlpDeleteRecord** deletes a record in a database. The database must already be open for writing.

*handle* specifies the database handle, as returned by [DlpOpenDB(3)](/DlpOpenDB/3.md).

*recid* specifies the ID of the record to delete; this identifier is usually gotten with **DlpReadRecordIDList**().

*flags* specifies flags:

- DLPCMD\_DELRECFLAG\_ALL

  Deletes all records in the database. *recid* is ignored.

- DLPCMD\_DELRECFLAG\_CATEGORY

  Deletes all records in a given category. The least-significant byte of *recid* specifies the category ID.

**DlpDeleteResource** deletes a resource in a database. The database must already be open for writing.

*handle* specifies the database handle, as returned by [DlpOpenDB(3)](/DlpOpenDB/3.md).

*type* and *id* specify the type and ID, respectively, of the resource to delete.

*flags* specifies flags. The only useful flag is DLPCMD\_DELRSRCFLAG\_ALL. When this flag is specified, the *type* and *id* arguments are ignored, and **DlpDeleteResource** deletes all resources in the database.

## RETURN VALUE

**DlpDeleteRecord** and **DlpDeleteResource** return 0 if successful, or a negative value in case of error.

## SEE ALSO

[libpconn(3)](/libpconn/3.md), DlpOpenDB.
