Metrologic Optimus S Programming Manual page 209

"c" programming guide
Table of Contents

Advertisement

Return
If successful, it returns 1.
On error, it returns 0.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
2
4
7
8
10
13
14
16
See Also
add_member, has_member
get_member
Purpose
To read a data record (member) from a DBF file.
Syntax
int get_member (int DBF_fd, int key_number, char *buffer);
int DBF_fd;
int key_number;
char *buffer;
Example
if (get_member (DBF_fd, 1, buffer) == 0) puts (buffer);
Description
This routine reads a data record pointed to by the index pointer of an IDX file
(key_number), which is associated with a DBF file (DBF_fd), into a character
array (buffer).
Return
If successful, it returns 1.
On error, it returns 0.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
2
4
7
Chapter 3 Terminal Specific Function Library
Interpretation
File specified by DBF_fd does not exist.
File specified by DBF_fd is not a DBF file.
Invalid file handle.
File not opened.
Not enough free block.
Invalid value in argument: key_number
IDX file specified by key_number does not exist.
No members exist in the DBF file.
/* key no. of the IDX file whose pointer points to the target member */
/* pointer to a buffer where the member is read into */
Interpretation
File specified by DBF_fd does not exist.
File specified by DBF_fd is not a DBF file.
Invalid file handle.
/* file handle of the target DBF file */
203

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents