Datasnap.DSProviderDataModuleAdapter.TDSProviderDataModuleAdapter.AS_ApplyUpdates

From RAD Studio API Documentation
Jump to: navigation, search


[–] Properties
Type: function
Visibility: public
Source:
Datasnap.DSProviderDataModuleAdapter.pas
Datasnap.DSProviderDataModuleAdapter.hpp
Unit: Datasnap.DSProviderDataModuleAdapter
Parent: TDSProviderDataModuleAdapter

Delphi

function  AS_ApplyUpdates(const ProviderName: OleStr; DeltaStream: OleVariant;
MaxErrors: Integer; out ErrorCount: Integer; OwnerDataStream: TDBXStreamValue): OleVariant;

C++

System::OleVariant __fastcall AS_ApplyUpdates(const System::Types::OleStr ProviderName, const System::OleVariant &DeltaStream, int MaxErrors, /* out */ int &ErrorCount, Data::Dbxcommon::TDBXStreamValue* OwnerDataStream);

Description

Applies updates received from a client dataset using a specified provider.

AS ApplyUpdates writes client updates to a dataset or database server. ProviderName specifies the name of the provider component that manages the update operation. DeltaStream is a Variant containing the updated, inserted, and deleted records to write to the database. MaxErrors indicates the maximum number of errors to permit before rolling back the update operation. ErrorCount returns the actual number of errors encountered during the update operation. OwnerDataStream is information supplied by the client application in a BeforeApplyUpdates event handler and returned to the client application in an AfterApplyUpdates event handler. It is passed to the provider's BeforeApplyUpdates event handler and returned from the provider's AfterApplyUpdates event handler.

Note: In Delphi, AS ApplyUpdates returns a Variant that is a data packet containing all records that could not be applied.

Note: In C++, the AS ApplyUpdates _result parameter returns the Variant containing the data packet.

See Also