This method writes properties to the current record.
Header file: | Wcedb.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 2.0 and later |
BOOL WriteCurrRecord( CCeDBRecord* pRecord, int nNumFilterProps = 0,
CCeDBProp *PropFilterArray = NULL );
TRUE indicates that the record was successfully written. FALSE indicates that there was an error. To get extended error information, call GetLastError.
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 are in the proper order for next seek operation.
CCeDBDatabase::ReadCurrRecord, CCeDBDatabase::SeekNext, CCeDBProp::CCeDBProp, GetLastError