In DBTools.h++, you can choose either asynchronous or synchronous behavior at the time you connect to a database. The member function RWDBDatabase::connection() produces synchronous or asynchronous connections depending on the parameter you supply. To establish an asynchronous connection, you invoke RWDBDatabase::connection() using RWDBConnection::Asynchronous as its parameter. Synchronous connections are the default, but you can specify a synchronous connection explicitly using RWDBConnection::Synchronous in place of the asynchronous parameter.
Section 10.7 lists the potentially asynchronous functions in DBTools.h++. These functions can behave asynchronously when executed using an asynchronous RWDBConnection, or synchronously using an explicit synchronous connection or the default.
When a function is executed asynchronously, it immediately returns to the caller with a Future object, an incomplete DBTools.h++ class such as RWDBResult. The type of the returned object is the same for both asynchronous and synchronous functions; however, the state of the object is set to notReady for asynchronous executions. This Future object will come into being or ready state later, typically after completion of the asynchronous call. Section 10.6 explains how to handle asynchronous calls when the object returned by an asynchronous function is a C++ datatype instead of a DBTools.h++ datatype.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.