Client datasets can pass parameters to the source dataset to specify what data they want provided in the data packets it sends. These parameters can specify
At runtime, use the CreateParam method of the Params property to add parameters to your client dataset. CreateParam returns a parameter object, given a specified name, parameter type, and datatype. You can then use the properties of that parameter object to assign a value to the parameter.
For example, the following code adds an input parameter named CustNo with a value of 605:
with ClientDataSet1.Params.CreateParam(ftInteger, 'CustNo', ptInput) do AsInteger := 605;
TParam *pParam = ClientDataSet1->Params->CreateParam(ftInteger, "CustNo", ptInput); pParam->AsInteger = 605;
If the client dataset is not active, you can send the parameters to the application server and retrieve a data packet that reflects those parameter values simply by setting the Active property to True.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|