
PT-20 Programming Guide
int GetRecordNum(_DBMS* F_Search);
int record_num;
record_num= GetRecordNum(&fsearch);
GetRecordNum can pass back the amount of record storing in the file at
present.
Amount of record that stores in the file
Use this function can delete the appointed record in the file.
int DeleteRecord(_DBMS* F_Search,int recordnum);
DeleteRecord(&fsearch,2);//delete the third data of this file。
“DeleteRecord” can delete the appointed record, and change the size of
the file.
As success of deleting, file index will stay in the deleting record front. As
deleting defeat, file index will not move.
0: Delete defeat. 1: Delete success.
Use this function can delete the last record in the file.
int DeleteLastRecord(_DBMS* F_Search);
DeleteLastRecord(&fsearch);
“DeleteLastRecord” can delete the last record in the file, and change the
size of the file.
As success of deleting, file index will stay in deleting record front. As
deleting defeat, file index will not move.
0: Delete defeat. 1: Delete success.
Use this function can increase a new record on the file end.
int AppendRecord(_DBMS* F_Search,char* record);
char str_record[25]=”A1357924680,PA-20,3500”;
AppendRecord(&fsearch, str_record);
“AppendRecord” can increase a new record on the file end, the data of
record is introduced by char * record.
As increasing success, file index will be moved to the front of increasing
record.
Komentarze do niniejszej Instrukcji