|
AnyDAC
|
Applies changes for all records in the centralized change journal to the database.
|
Parameters |
Description |
|
AMaxErrors: Integer = -1 |
A maximum number of allowed errors. Default value is -1. |
The number of errors is encountered.
Use ApplyUpdates to apply changes for all records in the centralized change journal to the database. The centralized change journal collects changes from:
The ApplyUpdates call performs the steps:
Note, there is no CommitUpdates method, and it must be called in code for each associated dataset.
AMaxErrors indicates the maximum number of errors that the AnyDAC should allow before prematurely stopping the update operation. Set AMaxErrors to –1 to indicate that there is no limit to the number of errors, or to 0 to indicate that no error is allowed.
ApplyUpdates returns the number of errors it encountered. Based on this return value and the setting of AMaxErrors, successfully applied records are removed from the centralized change log. If the update process is aborted before all updates are applied, any unapplied updates remain in the change log.
ApplyUpdates does not raise exception. Instead application should review erroneous records using Reconcile and OnReconcileRow event handler, or FilterChanges and RowError properties for each dataset. Read "Reviewing errors" at Caching Updates for more details.
function ApplyUpdates(AMaxErrors: Integer = -1): Integer;
|
What do you think about this topic? Send feedback!
|