
PT-20 Programming Guide
Other value: the quantity of the data.
Use this function can revise the designated record in the existed file.
int WriteField(_DBMS* F_Search, int recordno, int fieldno, char* field);
char str_field[10]=”123456789”;
WriteField(&fsearch,0,1, str_field);// Revise the second field of the first
data to “str_field”.
As revising success, file index will be moved to the front of the record
included revising field.
Using WriteField function can copy the field of appointed record. If the file
in disc D that you want to write, it will not allow to write.
-1: Write into defeat.
Other value: Write into the amount of data.
Using this function can copy the existed record.
int WriteRecord(_DBMS* F_Search, int recordno, char* record);
char str_record[20]=”A123456,PA-20,2330”;
WriteRecord(&fsearch,0, str_record);// Revise the first record to char
str_record。
Use WriteRecord function can copy the existed record, but unable to
increase a new record.
As revising success, file index will be moved to revise the front of revising
record. If the file in disc D that you want to write, it will not allow to write.
-1: Write into defeat.
Other value: Write into the amount of data.
Use this function to read the data of appointed field in the appointed
record.
int ReadField(_DBMS* F_Search, int recordno, int fieldno, char* buffer);
char str_buffer[30];
ReadField(&fsearch,5,0,str_buffer);//Reading the data of first field in the
sixth record, and store to “str_buffer”.
int recordno : Read of record position.
int fieldno : Read of field position.
char* buffer : Read the storing space of field。
Kommentare zu diesen Handbüchern