DB Access Module for Microsoft SQL Server User’s Guide : Chapter 2 Technical Information : Result Sets
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 SQL 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 DML class returns an RWDBResult object. Applications that are concerned with results being returned by an INSERT, for example, can check the RWDBResult returned by RWDBInserter::execute().
Any data not processed by an application is silently discarded. SourcePro DB applications need not explicitly discard results; they need not consider the state of the database connection. Data is exchanged between the ODBC driver and the DB Interface Module via ODBC function calls. The statements associated with these calls are either explicitly closed by the Access Module or, if processing multiple results, implicitly closed through a call to SQLMoreResults().
Simultaneous Processing of Results from Multiple Statements Using the Same Connection
The DB Access Module for Microsoft SQL Server queries the SQL Server driver for the maximum number of simultaneously active SQL statements (SQLHSTMT) allowed per connection (SQL_MAX_CONCURRENT_ACTIVITIES). If a connection is used for a new operation, but already has the maximum number of simultaneous operations active, the results of the oldest operation are silently discarded.