
58
appointed record and compare with importing string. If agreeing, it
will copy the record which included the field to buffer.
Syntax
:
int SearchField_GR(_DBMS* F_Search, char* field, int
search_fieldno, int recordno, char* R_Buffer, int flag);
Example call
:
char str[8]=”abcdefg”,str_buffer[60];
SearchField_GR(&fsearch, str,0,0, str_buffer,FORWARD);
Includes
:
#include “DBMS.h”
This function can search and contrast the data of appointed field.
After success, reading the record which includes this field.
Several describe the argument as follows:
argument description
_DBMS* F_Search
The file’s searching structure that has
been initialized.
char* field
String data wanted to match.
int search_fieldno
Field wanted to search.
int recordno
Begin to search from which data.
char* R_Buffer
After contrast success, it will write
record which included this field into
buffer.
Description
:
int flag
FORWARD => Search form forward to
backward
BACKWARD => Search form
backward to forward
As success of searching, the file index
will stay in successful record front.
When search defeat, the file index will
not be moved (not support
BACKWARD at present).
Returns
:
When “R _ Buffer = NULL”, pass back – 1: Search defeat; Pass
other value back: That is the size of space for buffer.
When “R _ Buffer
≠
NULL”, pass back – 1: Search defeat; Pass
other value back: That is the record position which conform to
contrast data.
SearchField_GF
Purpose
:
Search the designated field. After success, acquiring the appointed
field in including the field’s record.
Syntax
:
int SearchField_GF(_DBMS* F_Search, char* field, int
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...