---
name: "PX_put_recordn"
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_put_recordn"
---

# PX\_put\_recordn(3)

Stores record in Paradox file at certain position

## NAME

PX\_put\_recordn — Stores record in Paradox file at certain position

## SYNOPSIS

\#include \<paradox.h\>

int PX\_put\_recordn(pxdoc\_t \*pxdoc, char \*data, int recpos)

## DESCRIPTION

Stores a record in the buffer **data** into a  Paradox file at the given position **recpos**.  The first position has number 0. The function will determine the  data block for this record. If the position is after the last data  block, then as many as needed empty data blocks will be added.  If the position is in the middle of a data block and there is  no record right before the position, then the position will be  recalculated to make sure the new record will be stored in the  first free slot of the datablock. For example, if a datablock contains  H records and the first call of **PX\_put\_recordn** wants  to store a record at position 11, then this will be corrected to position  H. **PX\_put\_recordn** will also add an empty data block  and store the record as the first record of the second data block.  Storing a second record at position 11 again, will be executed  without any position change.

**data** must be constructed with PX\_put\_data\_xxx(3)  functions before. It is of the same structure as the record returned  by [PX\_get\_record(3)](/PX_get_record/3.md) and [PX\_get\_record2(3)](/PX_get_record2/3.md).

## RETURN VALUE

Returns the record position on success and -1 on failure. The first  position has number 0.

## SEE ALSO

[PX\_get\_record(3)](/PX_get_record/3.md), [PX\_get\_record2(3)](/PX_get_record2/3.md), [PX\_put\_record(3)](/PX_put_record/3.md),  [PX\_put\_data\_byte(3)](/PX_put_data_byte/3.md),  [PX\_put\_data\_short(3)](/PX_put_data_short/3.md), [PX\_put\_data\_long(3)](/PX_put_data_long/3.md), [PX\_put\_data\_double(3)](/PX_put_data_double/3.md),  [PX\_put\_data\_alpha(3)](/PX_put_data_alpha/3.md)

## AUTHOR

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