URL: http://www.firstbasesoftware.com/man/man3/getrec.htm
Last modified: 4 April 1996
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
fb_getrec(rec, db)
long rec;
fb_database *db;
Fb_getrec retrieves logical record rec from the database pointed to by db and initializes the array of field structures. The map file descriptor stored in db->mfd is used to determine the location and length of the record in the database. The database file descriptor, stored in db->fd, is used to read the indicated record.
As mentioned, fb_getrec sets up all of the database field descriptors so each individual field is readily available. Each field is accessed through an array of field descriptors, or key pointers. The base of this array is located in the database structure variable db->kp.
A macro function, FB_FLD(n, db) can be used to access field number n of database db, or use fetch(3).
Note: getrec will lock record 0 to gain exclusive access to
the database only if the LOCKLEVEL is 2 or more. See
setup(5).