The record edit mode has been called by the AddNew method or by simple writing into the current record (record edit).
|aFields||[optional] (Variant) A single name, or an array of names or ordinal positions of the fields in the record.|
|aValues||[optional] (Variant) A single value, or an array of values for the fields in the new record. |
If aFields is an array, then aValues must also be an array with the same number of members, otherwise an error occurs.
The order of field names must match the order of field values in each array.
In the edit mode, the AdoRecordset object is locked, so it is impossible to call methods for moving the position of current record, 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 error the operation can be executed again with correct values or cancel the edit mode by the CancelUpdate method. See Example.