Cancel Method
AddNew Method
CancelBatch Property
CancelUpdate Method
LockType Property
UpdateBatch Method
METHOD: Recordset::Update
Boolean =
recordsetobject.
Update
(
Fields, Values
)
The
Update
method is called to save all changes you have made to the current
Record
to both the
Recordset
object and the data source. Clearly, both the
Recordset
object and the data source must support updates.
If you have made changes to a record and then move to another record, the
Update
method is implicitly called and the record is saved. After a call to this method is completed, the current record pointer will still point to the same current record.
The
Update
method is used to save a single record. The
UpdateBatch
method is called to save multiple records. (If the
Recordset
object supports batch updating, the new and changed records will be locally cached until you call the
UpdateBatch
method.)
There are two optional parameters.
The optional
Fields
parameter is a variant that is either a single field name, or an array of field names or ordinal positions, that you want to update.
The optional
Values
parameter is a variant that is a value or array of values for the field or array of fields that you wish to update.
Code (VBScript):
If MsgBox("Save All Changes", vbYesNo) = vbYes Then
objRecordset.
Update
MsgBox "All Changes Updated"
Else
objRecordset.CancelUpdate
MsgBox "Update Cancelled"
End If
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information