
PT-20 Programming Guide
int Close_Search(_DBMS* F_Search);
When want to finish the file searching state, you can use this function.
0: Close defeat.
1: Close success.
SearchField can search the appointed field that begin from the appointed
record and compare with importing string. If agreeing, pass back to the
first record.
int SearchField(_DBMS* F_Search, char* field, int search_fieldno, int
recordno, int flag);
char str[8]=”abcdefg”;
int Record_Num;
Record_Num =SearchField(&fsearch, str,0,0,FORWARD);
Several describe the argument as follows:
The file’s searching structure that has been
initialized.
String data wanted to match.
Begin to search from which data.
FORWARD => Search from forward to
backward
BACKWARD => Search from 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.
-1: Search defeat.
Other value: Match the record position of data
SearchField_GR can search the appointed field that begin from the
appointed record and compare with importing string. If agreeing, it will
copy the record which included the field to buffer.
int SearchField_GR(_DBMS* F_Search, char* field, int search_fieldno, int
Komentarze do niniejszej Instrukcji