|
Purpose |
Fetches a record using the main index | |
|
Old name |
#define ftchprm rec_fetch_main | |
|
Syntax (CCOWN) |
BOOLEAN rec_fetch_main(int flags, short *datarec, ADDITIONAL); | |
|
Syntax (DP4DBAPI) |
BOOLEAN dp4_rec_fetch_main(DCONN * dconn,short * datarec,int flags,int match_keys); | |
|
Parameters |
DCONN *dconn |
Handle to database connection |
|
|
short* datarec |
Pointer to the L field of database record to be read |
|
|
int flags |
Determines type of search used. For an explanation of this parameter see rec_fetch() |
|
|
int match_keys |
Indicates number of leading key fields which must match the initial values in the record. In the DP4DBAPI implementation you must pass a value for this parameter, even if it will be ignored. In the CCOWN implementation this parameter is optional, and the value is ignored unless you specify the DEPTH value in flags. |
|
Description |
rec_fetch_main() fetches, if there is one, a record from the database that matches the keys specified in the record using the prime index to search for a match. The rules for matching are explained in the documentation of rec_fetch(). For rec_fetch_main() the global variable there is set to indicate whether the read was successful. | |
|
Return values |
Returns TRUE if a record was successfully read from the database, otherwise FALSE. If the table that the record belongs to is not a valid database table or the the user does not have read access on the table being fetched, a system error will be generated. | |
|
See also |
||