The DBTools.h++ RWDBCursor class for DB-Library is implemented using the DB-Library dbcursorxxx() family of cursor emulation routines. These routines are subject to many restrictions:
Cursors are not supported by Sybase DB-Library through version 4.9.x. The first Sybase DB-Library release to support cursors is version 10.0. DBTools.h++ applications compiled and linked with a Sybase DB-Library version that does not support cursors will receive an Unsupported error if they attempt to instantiate an RWDBCursor.
DBTools.h++ cursors can be both sequential and scrollable. If the cursor is sequential, the only type of operation supported is RWDBCursor::Next. If the cursor is scrollable, supported cursor operations include: RWDBCursor::Next, RWDBCursor::Previous, RWDBCursor::Last, RWDBCursor::First, RWDBCursor::Absolute, or RWDBCursor::Relative.
RWDBSybDbLibSystemHandle::RWDBCURKEYSET is the default implemented cursor type in this access library. The cursor type corresponds to the DB-Library cursor type CUR_KEYSET. This cursor type can't hold more than 1000 rows. See Section 2.12.3, "Cursor Type," for more information about how to change the cursor type. Before using the scrolling cursors, make sure to read your DB-Library documentation to see which of the scroll options are legal when using a particular fetch type.
There must be a unique index on every table involved in every cursor operation. An error will result if any table does not have a unique index.
At present, because of a known bug in Sybase DB-Library, the SQL used to open a cursor cannot contain any table aliases. That means that syntax similar to the following is not supported:
select * from myTable t, ...
The presence of the table alias, t, causes DB-Library to generate syntax errors, which are then caught and reported by the SQL Server. This means that DBTools.h++ applications cannot use an RWDBSelector to instantiate an RWDBCursor. Instead, the RWDBCursor must be instantiated with an SQL string: a select statement that contains no aliases.
Positioned updates are implemented by DB-Library cursors as a delete followed by an insert.
Updating the last row of a table through a cursor causes subsequent fetches to succeed. Hence, programs that use a cursor to update every row may go into an infinite loop.
©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.