_BtGetFirst() Function

 

<< Click to Display Table of Contents >>

Navigation:  Low Level Functions >

 

_BtGetFirst() Function

 

Previous pageReturn to chapter overviewNext page

 

Purpose

 

 

Position the Btrieve file on the first logical record for a given index

 

 

 

Prototype

 

 

FUNCTION _BtGetFirst ( hFile AS PTR, ptrData AS PTR, nRecLen REF WORD,   ptrKey AS PTR, nKeyNo AS BYTE )  AS LOGIC PASCAL

 

 

 

Argument(s)

 

 

<hFile>File handle that was returned by _BtOpen
<ptrData>Pointer to the data structure.
<nRecLen>Length of the data structure. This value must be at least as long as the fixed-length portion of the record.
<ptrKey>Pointer to the Key buffer. Allocate BSIMAX_KEY_SIZE for this buffer
<nKey>Key Number, first key is numbered 0.

 

Returns

LOGICWas the move to the first logical record succesfull.

 

 

 

 

Description

 

 

If the Get First operation is unsuccessful, the MicroKernel may return one of the following status codes:

 

03File Not Open
04Invalid Key Number
09 End of File (when the logical file is empty)
22 Data Buffer Length

 

 

 

 

See Also

 

 

_BtGetLast(), _BtGetNext(), _BtGetPrevious()