DB Access Module for Sybase User’s Guide : Chapter 2 Technical Information : Open SQL and Sybase Open Client Client-Library : RWDBDataCallback and Open SQL
RWDBDataCallback and Open SQL
The data callback classes can be used with Sybase to fetch data only; inserting data is not supported. Data callbacks are useful for very large data that may not fit in memory for a single database call and are described in Section 15.3, “The Data Callback Classes,” in the DB Interface Module User’s Guide.
NOTE >> The DB Access Module for Sybase does not support inserting data with the data callback classes.
When fetching data, Sybase requires that the columns bound to a data callback must be at the end of the select list. For example, if two columns of type integer and LOB are selected, the integer must come before the LOB in the select list in order to use a data callback for the LOB column.
The DB Access Module for Sybase will fetch only one row on each call to RWDBOSql::fetch().
Piece Size Setting
The DB Access Module for Sybase sets the piece size for fetching data to 32768. This value represents bytes in the case of binary data, and code units in the case of character data.
Changing the Maximum Fetch Size
Sybase limits the length of text or image data that the server can return to 32768 bytes. This value can be changed by calling the Sybase function ct_options. Please see the class reference description for RWDBSybCtLibSystemHandle for more information about setting this option.
RWDBDataCallback::getLength()
The DB Access Module for Sybase does not support inserting data using the data callbacks, so the method RWDBDataCallback::getLength() does not need to be overridden in the derived class.
Stored Procedures and RWDBDataCallback
Stored procedure execution is not supported with the data callback classes.