Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

10.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.

On //1 an asynchronous connection is obtained from the database object. On //2 a create table query runs using the ::executeSql method. This method has been invoked asynchronously by supplying 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 status. //5 checks whether the call has been executed correctly or not.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.