An OraDynaset object permits browsing and updating of data created from a SQL
An OraDynaset object represents the result set of a SQL SELECT query or a
PL/SQL cursor variable returned from a stored procedure or function. It is
essentially a client-side scrollable and updatable cursor that allows for browsing the
set of rows generated by the query it executes. It is created by the CreateDynaset or CreateCustomDynaset method of an OraDatabase interface. An OraDynaset object can be used to
scroll result sets that contain instances of Relational as well as Object-Relational
columns such as (VARRAYs, Nested Tables, Objects, REFs, and LOBs and BFILEs).
This object provides transparent mirroring of database operations, such as
updates. When data is updated via the Update method, the local mirror image of the
query is updated so that the data appears to have been changed without
reevaluating the query. The same procedure is used automatically when records are
added to the dynaset. Integrity checking is performed to ensure that the mirrored
image of the data always matches the actual data present on the Oracle database.
This integrity checking is performed only when necessary (such as just before
During create and refresh, OraDynaset objects automatically bind all relevant,
enabled, input parameters to the specified SQL statement, using the parameter names as
placeholders in the SQL statement. This can simplify dynamic query building and
increase the efficiency of multiple queries using the same SQL statement with
varying WHERE clauses.
When you use Oracle Objects for OLE, locks are not placed on data until an
Edit method is executed. The Edit method attempts to obtain a lock using "SELECT
... FOR UPDATE" on the current record of the dynaset. This is done as late as
possible to minimize the time that locks are placed on the records. The Edit
method can fail for several reasons:
· The SQL query violates the Oracle SQL updatability rules. For example: using
calculated columns or table joins.
· The user does not have the privileges needed to obtain a lock.
· The record has been locked already by another user. Note: the OpenDatabase
method has an option so that you can decide whether to wait on locks.
For more information, see "SELECT ... FOR UPDATE".