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

# DlpWriteRecord(3)

write a record to a PalmOS device

## NAME

**DlpWriteRecord** – write a record to a PalmOS device

## LIBRARY

*libpconn*

## SYNOPSIS

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

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

*int*\

**DlpWriteRecord**(*PConnection \*pconn*, *const ubyte handle*, *const ubyte flags*, *const udword id*, *const ubyte attributes*, *const ubyte category*, *const udword len*, *const ubyte \*data*, *udword \*recid*);

## DESCRIPTION

**DlpWriteRecord** writes a record to a database on a Palm. The database must already be open for writing.

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

*flags* specifies flags. There are no useful flags. Set this argument to 0.

*id* specifies the record's ID.

*attributes* specifies the record's attributes. See the DLPCMD\_DBFLAG\_\* flags in *\<pconn/dlp\_cmd.h\>*.

*category* specifies the record's category (but see the BUGS section).

*len* specifies the length of *data*.

*data* points to the record data.

*recid* is filled in with the record ID on the Palm. The Palm may assign the record an ID other than that given by *id*.

## RETURN VALUE

**DlpWriteRecord** returns 0 if successful, or a negative value otherwise.

## SEE ALSO

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

## BUGS

The *category* argument might refer to the 8-bit category identifier, or it might refer to the 4-bit index of the category identifier in the AppInfo block. I think it's the latter.
