Edit Method (Remote Data)

       

Enables changes to data values in the current row of an updatable rdoResultset object.

Syntax

object.Edit

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Before you use the Edit method, the data columns of an rdoResultset are read-only. Executing the Edit method copies the current row from an updatable rdoResultset object to the copy buffer for subsequent editing. Changes made to the current row’s columns are copied to the copy buffer. After you make the desired changes to the row, use the Update method to save your changes or the CancelUpdate method to discard them. The current row remains current after you use Edit.

Caution   If you edit a row, and then perform any operation that repositions the current row pointer to another row without first using Update, your changes to the edited row are lost without warning. In addition, if you close object, or end the procedure which declares the result set or the parent rdoConnection object, your edited row might be discarded without warning.

You cannot use the Edit method if the EditMode property of the rdoResultset object indicates that an Edit or AddNew operation is in progress.

When the rdoResultset object’s LockEdits property setting is True (pessimistically locked) , all rows in the rdoResultset object’s rowset are locked as soon as the cursor is opened and remain locked until the cursor is closed. The number of rows in the rowset is determined by the RowsetSize property. Since many remote data sources use page locking schemes, pessimistic locking also locks all data pages of the table(s) containing a row fetched by the rdoResultset.

If the LockEdits property setting is False (optimistically locked), the individual row or the data page containing the row is locked and the new row is compared with the pre-edited row just before it’s updated in the database. If the row has changed since you last used the Edit method, the Update operation fails with a trappable error.

Note   Not all data sources use page locking schemes to manage data concurrency. In some cases, data is locked on a row-by-row basis, therefore locks only affect the specific rowset being edited.

Using Edit produces an error under any of the following conditions: