ADODB Object
 
Syntax
 
recordsetobject.Requery [Options]
 
Description
Used to update (refresh) the data in a Recordset object.This is essentially equivalent to a Close followed by an Open.
 
The Requery method is called to update all of the records in an open Recordset by re-executing the query to the database that originally created the Recordset.
 
If you need to change any of the property settings, you will have to call Close on the Recordset and then make the desired changes. This is because the properties are read-only when the Recordset is open and are read/write when the Recordset is closed.
 
If you are in the process of adding a new record or editing the current record, an error will be generated if you call this method.
 
If your database can be accessed by other users, it is quite possible that the new Recordset generated by the Requery will differ, perhaps significantly, from the previous Recordset.
 
There is one optional parameter.
 
Parameter
Description
Options
The optional Options parameter is one of the ExecuteOptionEnum constants that specify how the provider is to execute a command (the re-query).
 
 
ExecuteOptionEnum Constants 
 
Constant
Value
Description
adAsyncExecute
0x10
Execute asynchronously
adAsyncFetch
0x20
Rows beyond the initial quantity specified should be fetched asynchronously
adAsyncFetchNonBlocking
0x40
Records are fetched asynchronously with no blocking of additional operations
adExecuteNoRecords
0x80
Does not return rows and must be combined with adCmdText or adCmdStoredProc
adOptionUnspecified
-1
The CommandText parameter is unspecified
 
Note:
If Requery does not work properly, use Open and Close methods, one after the other. This is basiclly what the Requery method does.
See Also
Example
 
objRecordset.Requery