
PT-20 Programming Guide
The file’s searching structure that has been
initialized.
String data wanted to match.
The string form is “field string 0, field
number 0; field string 1, field number 1;...”.
Each field string and field number use
separate symbol ”,”, behind the field number
use separate symbol ”;”, last field number
don’t use any separate symbol.
Begin to search from which data.
After contrasting success, acquiring the data
of appointed field in this record.
After contrast success, it will write record
which included this field into buffer.
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.
When “F _ Buffer = NULL”, pass back – 1: Search defeat; Pass other
value back: That is the size of space for buffer.
When “F _ Buffer ≠ NULL”, pass back – 1: Search defeat; Pass other
value back: That is the record position which confirm to contrast data.
Move the searching index to the appointed record.
long SeekRecord(_DBMS* F_Search,int recordno);
SeekRecord(&fsearch,10);//move file index to eleventh record。
Use this function can move the search index to appointed record. The
number of first record is 0. The number of second record is 1.
-1: The index move is defeated.
Other value: the present address of searching index
Use this function can read the total amount of records storing in the file at
present. .
Kommentare zu diesen Handbüchern