Siliconetics Developer Center 
(609) 7607027
admin@srcsb.com
Untitled Document
SearchSearch:
ClassMethodReadRecord, ReadAt


DESCRIPTION:
Read a record from FlitBase file.

ClassCLASS: CFlitBase

PROTOTYPE(S):
CRecord* ReadRecord(int Type, int ID, CRecordHnd *phBuff = NULL);
CRecord* ReadRecord(CTag TID, CRecordHnd *phBuff = NULL);
CRecord* ReadRecord(int &DefPos, int Type, int ID, CRecordHnd *phBuff = NULL);
CRecord* ReadRecord(int &DefPos, CTag TID, CRecordHnd *phBuff = NULL);
CRecord* ReadRecord(int Type, LPCSTR pStr, int TextGrp, int TextID, bool CreateIndex = true);
CRecord* ReadAt(int Pos, CRecordHnd *phBuff = NULL);


ARGUMENT(S):
int TypeThe record type to be read.
int IDThe record id to be read.
CTag TIDA tag containing record type and id to be read.
int &DefPosThe default position to be fisrt checked by the system before scanning for the record.
int PosThe position of the record to be read.
CRecordHnd* phBuffThe pointer to a buffer to be used to hold the record for permanent usage.
LPCSTR pStrThe pointer to a string used to search the record.
int TextGrpText group id to search to.
int TextIDText id to search to.
bool CreateIndexIf true, a new index list will be created if currently not found.


RETURN VALUE:
This function returns the pointer to the read record. In case of error, this function returns a null pointer.

EXAMPLE:




COMMENT:
Use these functions to retreive a record from FlitBase file. The record to be read can be determined by its type and id or containing text. ReadAt function can be used to read a record that is determined by its position. A record read from a file is temporary and will be released when the file is closing or when the memory was reallocated by the system for other purposes. In order to make the record always available, you must supply a pointer to a handler to hold the read record permanently. The DefPos argument purposed to speed up the record access by suggesting the position and to hold a new position scanned by the system in case the suggested is not valid.
Untitled Document
SearchSearch: