OraDynaset Object
Description
An OraDynaset object permits browsing and updating of data created from a SQL
SELECT statement.
Remarks
The OraDynaset object can be thought of as a cursor, although in actuality several real cursors may be used to implement the
OraDynaset's semantics. An OraDynaset automatically maintains a local cache of data
fetched from the server and transparently implements scrollable cursors within
the browse data. Large queries may require significant local disk space;
application implementors are encouraged to refine queries to limit disk usage.
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
updates occur).
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".