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

# pdb\_AppendRecord(3)

add records to a Palm database

## NAME

**pdb\_AppendRecord** **pdb\_AppendResource** **pdb\_InsertRecord** **pdb\_InsertResource** – add records to a Palm database

## LIBRARY

*libpdb*

## SYNOPSIS

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

*int*\

**pdb\_AppendRecord**(*struct pdb \*db*, *struct pdb\_record \*newrec*);

*int*\

**pdb\_AppendResource**(*struct pdb \*db*, *struct pdb\_resource \*newrsrc*);

*int*\

**pdb\_InsertRecord**(*struct pdb \*db*, *struct pdb\_record \*prev*, *struct pdb\_record \*newrec*);

*int*\

**pdb\_InsertResource**(*struct pdb \*db*, *struct pdb\_resource \*prev*, *struct pdb\_resource \*newrsrc*);

## DESCRIPTION

**pdb\_AppendRecord** appends the record pointed to by *newrec* to the database *db*. Note that *newrec* is not copied, so the caller must not free it.

**pdb\_AppendResource** appends the resource pointed to by *newrsrc* to the database *db*. Note that *newrsrc* is not copied, so the caller must not free it.

**pdb\_InsertRecord** adds the record pointed to by *newrec* into the database pointed to by *db*, immediately after the record *prev*. If *prev* is NULL, the new record is inserted at the beginning of the database.

**pdb\_InsertResource** adds the resource pointed to by *newrsrc* into the database pointed to by *db*, immediately after the resource *prev*. If *prev* is NULL, the new resource is inserted at the beginning of the database.

## RETURN VALUE

These functions return 0 if successful, or a negative value otherwise.

## SEE ALSO

[libpdb(3)](/libpdb/3.md), [new\_Record(3)](/new_Record/3.md), new\_Resource(3).

## AUTHORS

Andrew Arensburger ⟨arensb@ooblick.com⟩ LIMITATIONS **pdb\_InsertRecord** and **pdb\_InsertResource** do not check whether *prev* is in *db*. It is strongly recommended that the caller not abuse this behavior.
