Result Sets
In the DB Interface Module paradigm, all results are tables. Class RWDBTable encapsulates a single table of results, 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.
Since Adaptive Server supports the notion of a trigger, it is possible for the INSERT, UPDATE, and DELETE operations to produce result sets, as well as the more common SELECT. In the DB Interface Module, the execute() method of each class returns an RWDBResult object. Applications that are concerned with results being returned by an INSERT, for example, can do so in a portable way by checking the RWDBResult returned by RWDBInserter::execute().
Data is exchanged between Adaptive Server and the DB Interface Module via the Client‑Library calls ct_command(), ct_send(), ct_results(), and ct_fetch(). Before calling ct_command(), the DB Interface Module calls ct_cancel(CS_CANCEL_ALL); before processing the next result set, the DB Interface Module calls the function ct_cancel(CS_CANCEL_CURRENT). The net effect is that any data not processed by an application is silently discarded; SourcePro DB applications need not consider the state of the database connection.