Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Edit Method

See Also
Example
Applies To

OraDynaset

Description

Begins an edit operation on the current row by copying the data to the copy buffer.

Usage

oradynaset.Edit

oradynaset.DbEdit

Remarks

Edit causes the locally cached data to be compared with the corresponding row of the Oracle database. An error will be generated if the Oracle database data is not the same as the data currently being browsed. If this operation succeeds, the row is locked using "SELECT ... FOR UPDATE" until the edit is completed with Update or until database movement occurs, which discards any edits in progress. The behavior of the "SELECT ... FOR UPDATE" is affected by the Lock Wait mode of the options flag used when the OpenDatabase method was called.

Note: The cached data is not compared to the database with BLOB and CLOB, Object, REF, and collection types and the data will be updated regardless (dirty writes).

During editing, changes made to fields are kept in a shadowed copy buffer and do not yet reflect the actual contents of the database. However, all references to the row return the newly modified data as long as the edit operation is still in progress.

When data is modified within a data control attached to this dynaset, the Edit method is invoked automatically upon the next record movement. Thus, this method is required only when modifications are made to field data within code.

Note: A call to Edit, AddNew, or Delete, will cancel any outstanding Edit or AddNew calls before proceeding. Any outstanding changes not saved using Update will be lost during the cancellation.