Requery Method (Remote Data)

       

Updates the data in an rdoResultset object by re-executing the query on which the object is based.

Syntax

object.Requery [options]

The Requery method syntax has these parts:

Part Description
object The object placeholder represents an object expression that evaluates to an object in the Applies To list.
options A Variant or constant that determines how the query is run, as specified in Settings.

Settings

You can use the following constant for the options part:

Constant Value Description
rdAsyncEnable 32 Execute operation asynchronously.

Remarks

Use this method to ensure an rdoResultset contains the most recent data. When you use Requery, all changes made to the data in the underlying table(s) by you and other users is displayed in the rdoResultset, and the first row in the rdoResultset becomes the current row.

If you use the rdAsyncEnable option, control returns to your application as soon as the query is begun, often before a result set is available. To test for completion of the query, use the StillExecuting property. The rdoResultset object is not valid until StillExecuting returns False. You can also use the QueryCompleted event to indicate when the query is completed.

If the rdoParameter objects have changed, their new values are used in the query used to generate the new rdoResultset.

Once the Requery method has been executed, all previously stored rdoResultset bookmarks are invalid.

If both the BOF and EOF property settings of the rdoResultset object are True, or the RowCount property is set to 0 after you use the Requery method, the query didn’t return any rows and the rdoResultset contains no data.

You can’t use the Requery method on rdoResultset objects whose Restartable property is set to False.