Update - method of object AdoRecordset

It is used for ending the edit mode and confirmation of all modifications of the current record. The record edit mode has been called by the AddNew method or by simple writing into the current record (record edit).
Update([aFields As Variant], [aValues As Variant])
oRs.Update aFields, aValues
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, 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.
The parameters aFields and aValues can be used to give the Update method all modified values. There are 2 ways to modify the values of the current record:
1) Modify the field values by repeating the Value method and then confirming the data by the Update method without any parameters.
2) Batch modification of the 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 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 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.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice