Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

12.2 Architectural Overview

In the DB Interface Module, 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 12.7 lists the potentially asynchronous functions in the DB Interface Module. 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 DB Interface Module 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 12.6 explains how to handle asynchronous calls when the object returned by an asynchronous function is a C++ data type instead of a DB Interface Module data type.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.