Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
See Also |
Examples |
Description
Returns the SnapshotID. Read and write at runtime.
Usage
SnapshotID = OraDynaset.Snapshot
Remarks
The SnapshotID represents the snapshot from which this dynaset was created. It can be thought of as a timestamp. It can be passed into other CreateDynaset method calls to cause them to be created using data from the same point in time as the original dynaset.
The SnapshotID property may be set with the value of another SnapshotID. That new snapshot will be used during the next Refresh when the query is re-executed. The Snapshot property always returns the SnapshotID on which this OraDynaset Object was based, not any other SnapshotID set through the snapshot property.
The SnapshotID will become invalid after a certain amount of time that is dependent on the amount of activity and the configuration of the database. When this happens you will get a "Snapshot too old" error message. For more information on snapshots, see the Oracle Database Concepts manual.
This SnapshotID represents the point in time when this dynaset was created. Changes to this dynaset (Edit, Delete, and AddNew operations) will not be reflected in additional dynasets created using this SnapshotID because they occurred after that point in time.
SnapshotID's are only meaningful for SELECT statements where the tables referenced are real database tables, as opposed to pseudo tables like DUAL.
One valuable use of SnapshotID is to calculate the number of rows in a table without using the RecordCount property which causes every row to be fetched. See Example 2 in the SnapShot Examples.
DataType
Object