CCeDBDatabase::ReadCurrRecord

This method reads the current record.

At a Glance

Header file: Wcedb.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later

Syntax

BOOL ReadCurrRecord( CCeDBRecord* pRecord, int nNumFilterProps = 0, CCeDBProp *PropFilterArray = NULL );

Parameters

pRecord
Pointer to a record. On return, this record contains the data read from the current record in the database. Any data that was previously contained in the record is destroyed, and any memory it owns is released.
nNumFilterProps
The number of properties in PropFilterArray. If this parameter is set to zero, the entire record will be read.
PropFilterArray
An array of valueless properties that specifies which properties to read from the current record. Construct the valueless properties by using the following sort property constructor:

CCeDBProp::CCeDBProp(CCeDBProp::enType nType,WORD wIdent, WORD wSortFlags). (Sort flags are ignored.)

If you pass in a null pointer, the entire record will be read.

Return Values

TRUE indicates that the record was successfully read. FALSE indicates that there was an error. To get extended error information, call GetLastError. This method also returns FALSE indicates that the m_bEOF data member has been set to TRUE during this call.

Remarks

If you do not pass in an array of properties, this method will read the entire current record.

If the m_bAutoSeekNext data member is set to TRUE, ReadCurrRecord calls the method SeekNext after reading the current record. If SeekNext advances the current position past the end of the database, the m_bEOF data member is set to TRUE.

The memory allocated for the record's properties, and their associated CEBLOBs and strings, is released when the record is destroyed.

See Also

CCeDBDatabase::m_bAutoSeekNext, CCeDBDatabase::m_bEOF, CCeDBDatabase::SeekNext, CCeDBDatabase::WriteCurrRecord, CCeDBProp::CCeDBProp, GetLastError