|
Purpose |
Fetches a record using a secondary index. This function is regarded as obsolete in 4.500 | ||
|
Syntax |
boolean ftch2nd(flags, datarec, indexrec, role, ADDITIONAL) | ||
|
Parameters |
int flags |
Indicates the search method used | |
|
|
short* datarec |
Pointer to the L field of table record to be read | |
|
|
short* indexrec |
Pointer to the L field of an index table record | |
|
|
int role |
Null-terminated string indicating the role | |
|
|
char* ADDITIONAL |
Optional fields depending on value of flags | |
|
|
The parameter flags can take any of the values as for the function rec_fetch_main(). The parameters indexrec and role determine which index is to be used in the search. If the flag contains the use of NEXT, the parameter ADDITIONAL is used to specify the depth required. | ||
|
Description |
The function ftch2nd() fetches a record from the database using a secondary index. Note that the key data should be assigned to the datarec record not the indexrec table. | ||
|
Return values |
The return value indicates whether the read was successful or not. The program terminates if the index or the role is invalid, or for any of the reasons that the function rec_fetch_main() terminates. | ||
|
See also |
|||
|
Example |
| ||