Datasnap.Xmlxform.TXMLTransformClient.ApplyUpdates

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function  ApplyUpdates(const UpdateXML, UpdateTransformFile: string; MaxErrors: Integer): Integer; virtual;

C++

virtual int __fastcall ApplyUpdates(const System::UnicodeString UpdateXML, const System::UnicodeString UpdateTransformFile, int MaxErrors);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Xmlxform.pas
Datasnap.Xmlxform.hpp
Datasnap.Xmlxform TXMLTransformClient

Description

Inserts or deletes the records corresponding to the data in an XML document.

Call ApplyUpdates to transform an XML document into a delta packet that inserts or deletes all of the resulting records and send it to the associated provider so that it can be applied. Before you can call ApplyUpdates, you must define the transformation to use by setting properties on the XML transform component specified by TransformApplyUpdates.

UpdateXML is the XML document that can be transformed into a delta packet. Typically, it contains the contents of an XML document file.

UpdateTransformFile is the name of a transformation file that converts UpdateXML into an insert or delete delta packet. A transformation file is a special type of XML file with the .xtr extension. The transformation file is specific to a particular XML schema, data packet format, and update operation (insert or delete). Use the xmlmapper utility to create the transformation file.

Note: If UpdateTransformFile includes any user-defined conversions, ApplyUpdates generates an OnTranslate event on TransformApplyUpdates when it needs to transform user-defined nodes in the UpdateXML string into corresponding field values.

MaxErrors indicates the maximum number of errors that the provider should allow before prematurely stopping the update operation. Set MaxErrors to –1 to indicate that there is no limit to the number of errors.

ApplyUpdates returns the number of errors it encountered.

See Also