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

# pdb\_FindRecordByIndex(3)

search for records in Palm databases

Part of [pdb\_FindRecordByID(3)](/pdb_FindRecordByID/3.md).

## NAME

**pdb\_FindRecordByID** **pdb\_FindRecordByIndex** – search for records in Palm databases

## LIBRARY

*libpdb*

## SYNOPSIS

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

*struct* *pdb\_record* *\**\

**pdb\_FindRecordByID**(*const struct pdb \*db*, *const udword id*);

*struct* *pdb\_record* *\**\

**pdb\_FindRecordByIndex**(*const struct pdb \*db*, *const uword index*);

## DESCRIPTION

**pdb\_FindRecordByID** looks for a record in *db* whose ID is *id*, and returns a pointer to it. Note that **pdb\_FindRecordByID** does not make a copy of the record, so the pointer it returns should not be freed with **pdb\_FreeRecord**, nor should it be added to another *struct* *pdb* ; for this, use **pdb\_CopyRecord**() first.

**pdb\_FindRecordByIndex** returns the *indexth* record in *db*, or NULL if there are fewer than *index* - 1 records in *db*.

## RETURN VALUE

**pdb\_FindRecordByID** and **pdb\_FindRecordByIndex** return a pointer to the matching record, or NULL if there is none.

## SEE ALSO

[libpdb(3)](/libpdb/3.md), pdb\_FreeRecord(3), [pdb\_CopyRecord(3)](/pdb_CopyRecord/3.md).

## AUTHORS

Andrew Arensburger ⟨arensb@ooblick.com⟩

## LIMITATIONS

If there is more than one record in a database with the same ID (which should never happen), **pdb\_FindRecordByID** will only find the first one.
