<< Click to Display Table of Contents >>
Refreshes the data in the Server from the underlying database.
METHOD Resync ( lAffectRecords, lResyncValues ) CLASS AdoServer
lAffectRecords (Optional) An AffectEnum value that determines how many records the Resync method will affect.
lResyncValues (Optional) A ResyncEnum value that specifies whether underlying values are overwritten.
The server will send a NOTIFYINTENTTOMOVE before the operation and a NOTIFYFILECHANGE after the operation.
Note The table needs to have a primary key, or else Resync will fail !
Use the Resync method to resynchronize records in the current Recordset with the underlying database. This is useful if you are using either a static or forward-only cursor, but you want to see any changes in the underlying database.
If you set the CursorLocation property to adUseClient, Resync is only available for non-read-only Recordset objects.
Unlike the Requery method, the Resync method does not re-execute the Recordset object's underlying command. New records in the underlying database will not be visible.
If the attempt to resynchronize fails because of a conflict with the underlying data (for example, a record has been deleted by another user), the provider returns warnings to the Errors collection and a run-time error occurs. Use the Filter property (adFilterConflictingRecords) and the Status property to locate records with conflicts.
If the Unique Table and Resync Command dynamic properties are set, and the Recordset is the result of executing a JOIN operation on multiple tables, then the Resync method will execute the command given in the Resync Command property only on the table named in the Unique Table property.
AdoServer, AdoAffectEnum, AdoResyncEnum, AdoExecuteOptionEnum