6.15 LceFetch

Retrieves the values of the specified fields for a single record from the specified file using the key list.







 char far * 




 char far * 




 char far * 

strKeyList ) 




The session identifier as returned by LceGetSessionId.


A list of field names to be retrieved from the file. Each field listed must have been declared using an LceUseField function.


The name of the file. This file must have been declared using an LceUseFile function.


A list of field names to be used as keys. These key fields must have been declared using the LceUseField function.

This list must match the sequence of the actual keys to the file, however, all file keys do not need to be specified. A partial key can be used. When a partial key is used, the first record matching the partial key will be returned.


Return Values

TRUE is returned if the session has fetched the record.

FALSE is returned if an error occurs.


The LceGetFieldValueX/ LceGetFieldValueU is used to obtain the values of the fields once this fetch has completed successfully.

For record locking, refer to the LceSetSelectOptions function.

Warning: If you are selecting records and have used *RECEIVEIMMED on the LceSetSelectOptions function, you cannot perform a fetch in the same session until all selected records have been read. If you need to read records from another file, you must either open another session or use a predetermined join field on the file on the host. Refer to the LceSetSelectOptions function for more details.

Related Functions

6.71 LceUseFile

6.58 LceSetFieldValue

6.59 LceSetFieldValueU

6.29 LceGetFieldValueX

6.30 LceGetFieldValueU

6.64 LceSetSelectOptions

6.8 LceCheckFor

6.50 LceRequestSelect

6.48 LceReceiveNextX