The parameters
aFields and
aValues can be used to give in the
Update method all modified values. There are 2 ways to modify the values of the current record:
1) Change the field values by writing into the
Value property and then confirming the data by the
Update method without parameters.
2) Batch modification of values by the additional parameters
aFields and
aValues of the
Update method.
Caution:
In the edit mode, the
AdoRecordset object is locked, so it is impossible to call methods for moving the current record position, etc., until the edit mode is terminated by calling the
Update or
CancelUpdate methods. The
Update method returns no value, but it can possibly fail (e.g. when trying to write a record with key value that allready exists or with invalid values). If the
Update method fails, the
AdoRecordset object stays locked and cannot be used in a normal way. Therefore it is necessary to test the result of the
Update method by means of the
Pm_LastErr property of the
Wrapper object object (that wrapps each
AdoRecordset object automatically in the PROMOTIC system).
In case of an error, either the operation can be executed again with correct values or cancel the edit mode by the
CancelUpdate method. See
Example.