Following is a description of cursor capabilities that DirectConnect supports, as well as the limitations that apply:
Only CT-Library client applications built on Open Client System 10 or later can use cursor capabilities.
The DB2 access service supports a maximum of 50 simultaneously declared cursors for each client connection.
In both sybase and passthrough modes, the DB2 access service does not send text with the cursor delete command; instead, it formulates the DBMS-specific equivalent of:
delete from <tablename> where current of cursor <cursorname>
where <cursorname> is based on the current Open Server cursor ID.
The DB2 access service does not support the from clause in an update statement.
When the client application issues a rollback, DB2 closes and frees all cursors. The client application must also close and free its cursors at this point, so that CT-Library synchronizes with the actual state of the cursors.
The client application can select the behavior of cursors after a commit; in other words, the cursor is either closed, or it is not closed and retains its position:
If the client executes a set CloseOnEndtran on command before any cursors were declared, then all cursors are closed—but not freed—after the commit. The client application closes its cursors so that CT-Library synchronizes with the actual state of the cursors. If the application does not execute the close on endtran statement, on is the default, so the statement executes anyway.
If the client executes a set CloseOnEndtran off command before any cursors are declared, then all cursors remain open and retain their current position after a commit occurs. This corresponds to the with hold clause in DB2.
A parameter marker can vary depending on the transformation mode:
In passthrough mode, the marker is a question mark (?).
In sybase mode, the marker is an (@) “at”sign.
The DB2 access service supports long character and binary parameters. Client applications must describe such parameters as CS_LONGCHAR or CS_LONGBINARY.
DB2 limits the SQL statement for any request (such as a cursor declare or update) to 32,765 bytes. With data and null indicators added, the total limit is 32,767.
The DB2 access service does not allow you to declare a cursor in a dynamically prepared select statement.
Copyright © 2005. Sybase Inc. All rights reserved. |