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.5 Asynchronous Usage Example

As you will discover, the asynchronous mechanism can be used in many powerful ways. At this point, however, let's look at a very simple example just to see how it works.

Example 15: Asynchronous usage

On //1 an asynchronous connection is obtained from the database object. On //2 an SQL statement is executed using the executeSql() method. This method has been invoked asynchronously by using the asynchronous connection obtained in //1. Then //3 checks whether the returned RWDBResult object is ready or not. If the RWDBResult object is not ready, it goes into the loop and does some work in //4. In this example, the work done in //4 gets repeated until the RWDBResult object gets to a ready state. //5 checks whether the call has been executed successfully or not.



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.