---
name: "PX_retrieve_record"
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_retrieve_record"
---

# PX\_retrieve\_record(3)

Returns record in Paradox file

## NAME

PX\_retrieve\_record — Returns record in Paradox file

## SYNOPSIS

\#include \<paradox.h\>

pxval\_t \*\* PX\_retrieve\_record(pxdoc\_t \*pxdoc, int recno)

## DESCRIPTION

Returns the record with the given number in a Paradox file. The  first record has number 0, the last one has number\_of\_records-1.

If you are accessing several records, do it in ascending order, because  this is the most efficient way.

The return value is an array of field values. Each value is stored in  a structure like the following:

```
typedef struct px_val pxval_t;
struct px_val {
char isnull;
int type;
union {
long lval;
double dval;
struct {
char *val;
int len;
} str;
} value;
};
```

The element **isnull** is set to 1 if the  value is NULL otherwise it is set to 0. **type** 			is the type of the paradox field as defined in  **paradox.h**.  A field value can be either a long int, a double or a string, depending  on the paradox field type. The paradox field types pxfShort, pxfLong,  pxfDate, pxfTime, pxfLogical, and pxfAutoInc are returned as long int  values.  pxfTimestamp, pxfNumber, and pxfCurrency are returned as double values  and all remaining paradox field types are stored as strings with the length  in **value.len**. You can rely on strings being Null  terminated. Blobs are stored as string but are not guarented to be  Null terminated.

The paradox field types pxfTimestamp, pxfTime, an pxfDate use an  uncommon format which can be converted into a string with  **[PX\_timestamp2string(3)](/PX_timestamp2string/3.md)**,  **[PX\_time2string(3)](/PX_time2string/3.md)**, and  **[PX\_date2string(3)](/PX_date2string/3.md)**.

## RETURN VALUE

Returns a pointer on success and NULL on failure.

## SEE ALSO

**[PX\_update\_record(3)](/PX_update_record/3.md)**,  **[PX\_timestamp2string(3)](/PX_timestamp2string/3.md)**,  **[PX\_time2string(3)](/PX_time2string/3.md)**,  **[PX\_date2string(3)](/PX_date2string/3.md)**

## AUTHOR

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