Result Sets
In the DB Interface Module paradigm, all results are tables. Class RWDBTable encapsulates a single result set, class RWDBResult encapsulates a sequence of 0 or more tables, and class RWDBReader provides the mechanism for reading a table. Consequently, handling multiple result sets is never a problem.
Results are created and data is exchanged between the Oracle Server and the DB Interface Module using the OCI calls OCIStmtPrepare(), OCIDescribeAny(), OCIDefinebyPos(), OCIStmtExecute(), OCIStmtFetch2(), all executed through a reference counted OCIStmt*. The OCIStmt* is deallocated when references to it go to 0. The net effect is that all results not processed by an application are silently discarded; SourcePro DB applications need not care about the state of the data.
Results are requested from the Oracle Server several rows at a time. The number of rows requested is dependent on the OCI statement attribute OCI_ATTR_PREFETCH_ROWS. Please refer to RWDBOCISystemHandle entry in the SourcePro API Reference Guide for setting the attribute via the RWDBOCISystemHandle::prefetchSize API. Requesting several rows at a time reduces the number of network messages between the application and the Oracle Server, and consequently increases the application's processing speed. Please refer to Oracle Call Interface documentation for more information on OCI_ATTR_PREFETCH_ROWS attribute.