---
name: "PX_read_primary_index"
section: "3"
platform: "linux"
package: "pxlib-dev"
version: "0.6.9-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PX_read_primary_index"
---

# PX\_read\_primary\_index(3)

Reads the primary index into an internal buffer

## NAME

PX\_read\_primary\_index — Reads the primary index into an internal buffer

## SYNOPSIS

\#include \<paradox.h\>

int PX\_read\_primary\_index(pxdoc\_t \*pindexdoc)

## DESCRIPTION

Reads the complete primary index into an internal buffer. After  calling this function successfully you usually add the index to  a database file by calling [PX\_add\_primary\_index(3)](/PX_add_primary_index/3.md). Once the index  is read and associated with a database file, it will be used when  record data is accessed.

## RETURN VALUE

Returns 0 on success and -1 on failure.

## SEE ALSO

[PX\_add\_primary\_index(3)](/PX_add_primary_index/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
