Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Requery - method of object AdoRecordset

Description:
The method updates the data in a AdoRecordset object by re-executing the SQL query that created the original AdoRecordset object. It reflects all changes that occured in the database (new records, deleted records, modified records).
Syntax:
Requery([nOptions As Long])
Calling:
oRs.Requery nOptions
Parameters:
nOptions[optional] (Long) Specifies how to execute this command. It can be an ADO AffectEnum value
-1 (default) - (adOptionUnspecified) Non-defined command means standard execution (synchronous).
16 - (adAsyncExecute) Asynchronous query, i.e. the method does not wait for the operation result. Corresponds to the ADO adAsyncExecute value.
32 - (adAsyncFetch) Indicates that the rows defined by the ADO Recordset.CacheSize property are to be read synchronously and any remaining records should be fetched asynchronously. Corresponds to the ADO adAsyncFetch value.
64 - (adAsyncFetchNonBlocking) Defines that the main thread will never be blocked while reading is being processed. If the requested row is not read, the cursor will be moved to the end. Corresponds to the ADO adAsyncFetchNonBlocking value.
512 - (adExecuteRecord) specifies that the called query/command returns a single row, that has the form of AdoRecord object. Corresponds to the ADO adExecuteRecord value.
Note:
Compared to the Resync method, the records are not only synchronized with existing records in the AdoRecordset object.
See also:
Example:
Re-reading the AdoRecordset object, previously created and stored in the PmAdo object ("/TestAdoDb") with defined identifier ("table1").
Dim oDb, oRs
Set oDb = pMe.Pm("/TestAdoDb")
Set oRs = oDb.RsGet("table1")
  oRs.Requery
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice