Metrologic Optimus S Programming Manual page 208

"c" programming guide
Table of Contents

Advertisement

202
"C" Programming Guide For Optimus S/R
delete_member
This routine creates an IDX file (key_number), which is associated with a DBF
Description
file (DBF_fd). The key field of the IDX file is specified by the arguments
key_offset and key_len.
The key field should be within member_len as defined in the create_DBF
function. That is, key_offset plus key_len should not be greater than
member_len.
This routine can only be called before any members are added to the DBF
file, i.e. when the DBF file is empty (no members exist).
If any member exists in the DBF file, rebuild_index should be used
instead.
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
6
7
8
13
17
18
19
See Also
create_DBF, rebuild_index, remove_index
Purpose
To delete a data record (member) from a DBF file.
int delete_member (int DBF_fd, int key_number);
Syntax
int DBF_fd;
int key_number;
Example
delete_member (DBF_fd, 1);
Description
This routine deletes a data record pointed to by the index pointer of an IDX file
(key_number) which is associated with a DBF file (DBF_fd).
Interpretation
File specified by DBF_fd does not exist.
File specified by DBF_fd is not a DBF file.
Cannot create file. Because it is beyond the maximum
number of files allowed in the system.
Invalid file handle.
File not opened.
Invalid value in argument: key_number
Invalid value in argument: key_offset, and/or key_len
DBF file specified by DBF_fd is not empty.
IDX file specified by key_number already exists.
/* key no. of the IDX file whose pointer points to the target member */
/* file handle of the target DBF file */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents