RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLTransformClient.SetParams Method

Sets input parameters to values supplied in an XML document.

Pascal
procedure SetParams(const ParamsXml: string; const ParamsTransformFile: string);
C++
__fastcall SetParams(const AnsiString ParamsXml, const AnsiString ParamsTransformFile);

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. 

 

GetDataAsXml 

OnTranslate 

ProviderName 

TTable 

TSQLTable 

TransformSetParams 

Using an XML Document as the Client of a Provider

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!