
62
Other value: Write into the amount of data.
ReadField
Purpose
:
Use this function to read the data of appointed field in the
appointed record.
Syntax
:
int ReadField(_DBMS* F_Search, int recordno, int fieldno, char*
buffer);
Example call
:
char str_buffer[30];
ReadField(&search,5,0,str_buffer);//Reading the data of first field
in the sixth record, and store to “str_buffer”.
Includes
:
#include “DBMS.h”
Description
:
int recordno : Read of record position.
int fieldno : Read of field position.
char* buffer : Read the storing space of field
。
Returns
:
When char * buffer = NULL, functions will pass the data size
back. Read defeat: Pass back - 1.
When char * buffer
≠
NULL. Read succeed: Pass 1 back; Read
defeat: Pass back - 1.
ReadRecord
Purpose
:
Use this function to read the data of appointed record.
Syntax
:
int ReadRecord(_DBMS* F_Search, int recordno, char* buffer);
Example call
:
char str_buffer[30];
ReadRecord (&search,5,str_buffer);//Reading the data of sixth
record, and store to “str_buffer”.
Includes
:
#include “DBMS.h”
Description
:
int recordno : Read of record position
。
char* buffer : Read the storing space of field
。
Returns
:
When char * buffer = NULL, functions will pass materials size
back. Read defeat. Pass back - 1.
When char * buffer does not equal NULL. Read succeed. Passing
1 back; Read defeat. Pass back - 1.
Содержание 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 ...