RemoteData Control Asynchronous Operation

If you set the RemoteData control's Options property to rdAsyncEnable before the RemoteData control creates the rdoResultset, control returns to your application before the rdoResultset contains rows. Just as with other asynchronous RDO programming, check the StillExecuting property of the rdoResultset object to determine when the first data row is available. To cancel the query, use the rdoResultset.Cancel method. Once the query is complete, the RemoteData control's QueryCompleted event is invoked, which indicates that new data is now available from the rdoResultset.

If you do not specify asynchronous operation with rdAsyncEnable, no other Visual Basic operations or events can occur until the first data row of the rdoResultset is fetched. However, other Windows-based applications can continue executing while the rdoResultset is being created.

When you use a RemoteData control to create an rdoResultset object, the remote database engine automatically populates the rdoResultset object as a background task. As a result, any existing bookmarks are saved, the user doesn’t need to manipulate the RemoteData control, and you don’t need to invoke the MoveLast method in code. In addition, page locks used to create the rdoResultset are released more quickly, making it possible for other rdoResultset objects to access the same data.

You can also create an rdoResultset object using the OpenResultset method and set the Resultset property to the new rdoResultset. If this is done, all other appropriate RemoteData control properties are reset to reflect the new rdoResultset and rdoConnection.