BtrvGetFirst

Prev Next Home Home Table Of Contents Index

BtrvGetFirst (DataVar,Key,Handle)

BtrvGetFirst goes to the first record of the file based on the key number that you pass and reads the record into DataVar. This allows you to access that database in the sorted order of the key. DataVar is a MarxMenu variable and the data read creates an array of the fields stored on disk.


Example:
Var Fields, Handle, DataVar ReadAscTextFile('FIELDS.TXT',Fields) Handle = BtrvOpen('BBSUSER.BTD',Fields)

BtrvGetFirst(DataVar,1,Handle) while BrtvResult = 0 loop DataVar Write LoopVal ' ' endloop Writeln BtrvGetNext(DataVar,1,Handle) EndWhile

This example dumps the contents of a file to the screen.


 Result Codes:
   6 - Invalid Key Number

See Also: BtrvGetLast BtrvGetNext BtrvGetPrev

Category: Btrieve

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home