The DBTools.h++ RWDBCursor class for Oracle8 is implemented using a row-by-row fetch. The phrase for update is appended to the RWDBSelector or SQL statement when the cursor is constructed with access = RWDBCursor::Write; therefore, selected rows have exclusive locks. The use of cursors is subject to many restrictions:
Cursors are not directly supported by the OCI library, and therefore the same restrictions that apply to the OCI precompiler cursors apply to RWDBCursor. The most severe restriction is that positioned updates or deletes can only be made to cursors created from a single table. Cursors created with a join of two tables cannot perform positioned updates or deletes.
Oracle8 cursors are not scrollable; the only type of fetch supported is RWDBCursor::fetchNext. Other types of fetch will result in an RWDBStatus::notSupported error.
Positioned deletes, inserts, and updates are implemented by constructing the appropriate SQL statement and executing the SQL statement using a second OCIStmt*. The RWDBCursor must be produced from within a transaction. The effect of the cursor update or delete won't be seen until the transaction is committed.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.