Datasnap.Xmlxform.TXMLTransformClient.SetParams

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetParams(const ParamsXml, ParamsTransformFile: string);

C++

void __fastcall SetParams(const System::UnicodeString ParamsXml, const System::UnicodeString ParamsTransformFile);

Properties

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

Description

Sets input parameters to values supplied in an XML document.

Call SetParams to supply input parameter values before fetching data from the provider. Parameter values can represent the input parameters to a query or stored procedure, or they can represent field values that filter the data when the provider represents the data in a TTable or TSQLTable component.

ParamsXML is the XML document that represents the parameter values to set. Typically, it contains the contents of an XML document file.

ParamsTransformFile is the name of a transformation file that converts ParamsXml into a data 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 and data packet format. Use the xmlmapper.exe utility to create the transformation file.

Note: If ParamsTransformFile includes any user-defined conversions, the component specified by TransformSetParams generates an OnTranslate event when it needs to transform user-defined nodes in the ParamsXml string into corresponding parameter values.

The TXMLTransformClient component stores parameter values internally. Each time you call SetParams, you update those internally stored values. Parameter values from previous calls are not cleared, so be sure to set every parameter value you want to change.

The next the GetDataAsXml method is called, TXMLTransformClient sends the currently stored parameter values to the provider.

See Also