This member function writes properties to the current record.
BOOL WriteCurrRecord( CCeDBRecord* pRecord, int nNumFilterProps = 0, CCeDBProp *PropFilterArray = NULL );
Header file: | Wcedb.h |
Platforms: | |
Versions: | 2.0 and later |
TRUE if the record was successfully written. FALSE if there was an error. Call ::GetLastError to determine why the operation failed.
The CCeDBRecord object you pass by reference in the pRecord parameter does not have to contain all the properties that the current record in the database does. You can pass in a record that contains only the specific properties you want to change. In this case, you do not need to use a filter array. For example, if the record in the database has eight properties, and you only need to modify two of them, you can create a new record with just those two properties, and pass a pointer to that record in pRecord. You would not use the other two parameters.
On the other hand, if you already have the current record open from a previous ReadCurrRecord operation, you can make changes directly to the properties in that CCeDBRecord object. Then, create a filter array of valueless properties with the same application-defined identifiers as the properties you want to change in the record. Then pass a pointer to the record in the pRecord parameter, the number of properties you modified in the nNumFilterProps parameter, and the filter array in the PropFilterArray parameter.
Whenever you alter a record, the records are resorted so they'll be in the proper order for next seek operation.
CCeDBDatabase Overview, CCeDBDatabase Member Functions, Windows CE Database Classes, CCeDBDatabase::ReadCurrRecord, CCeDBDatabase::SeekNext, CCeDBProp::CCeDBProp, ::GetLastError