Navigation:  DataServer Classes > DaoQuery Class >

DaoQuery:Requery() Method

Previous pageReturn to chapter overviewNext page


Re-executes the query the DaoQuery is based on






Use this method to make sure that a Query contains the most recent data. This method re-populates the current Query by using either the current query parameters or (in a Microsoft Jet workspace) the new ones supplied by the oQueryDef argument.


In an ODBCDirect workspace, if the original query was asynchronous, then Requery will also execute an asynchronous query.

The Query is re-populated based on the same query definition and parameters used to originally populate the Recordset. Any changes to the underlying data will be reflected during this re-population. If you didn't use a QueryDef to create the Recordset, the Recordset is re-created from scratch.


When you use Requery, the first record in the Query becomes the current record.


You can't use the Requery method on dynaset- or snapshot-type Query objects whose Restartable

property is set to False. However, if you supply the optional oQueryDef argument, the Restartable property is ignored.

If both the BOF and EOF


property settings of the Query object are True after you use the Requery method, the query didn't return any records and the Query contains no data.