Cursors > Results Retrieval
 
Results Retrieval
Once an SQL select statement has been executed as a query, the resulting data can be fetched using the member function IldRequest::fetch or IldRequest::fetchScroll.
The member function IldRequest::fetchScroll is implemented for RDBMSs that enable this feature: Informix®, Mssql, Oracle® and Odbc.
You can go back in the result set when you use this function, while IldRequest::fetch lets you only access the records that follow it.
To activate this feature, you must activate the scrollable cursor mode by calling IldRequest::setScrollable(IlTrue). This feature is not activated by default because it requires additional resources on the server side. Furthermore, the RDBMS may restrict the set of queries you can run. For instance, with Informix, you cannot fetch a BYTE or TEXT column using a scrollable cursor.
When the column array size is used to fetch several rows at the same time, the <n> last rows will be retrieved if fetchOrientation == IldFetchDirectionLast.
Once fetched, the data can be read using the specialized accessors IldRequest::getCol<type>Value, where <type> is one of the valid Rogue Wave DB Link column type names (see Direct Access for details).
A faster way to retrieve and send data is to bind application-allocated memory to Rogue Wave DB Link. This can be done for input values as well as for output columns.
The following items are described individually:
*Handling Multiple Result Sets
*Direct Access
*Binding to User-Allocated Memory

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.