Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TParams.CopyParamValuesFromDataset

Copy parameter values from the fields in a dataset.

Declaration

Source position: db.pas line 1553

public procedure TParams.CopyParamValuesFromDataset(

  ADataset: TDataSet;

  CopyBound: Boolean

);

Arguments

ADataset

  

Dataset to copy values from.

CopyBound

  

Copy value also for bound parameters ?

Description

CopyParamValuesFromDataset assigns values to all parameters in the collection by searching in ADataset for fields with the same name, and assigning the value of the field to the Tparam instances using TParam.AssignField. By default, this operation is only performed on TParam instances with their Bound property set to False. If CopyBound is true, then the operation is performed on all TParam instances in the collection.

Errors

If, for some TParam instance, ADataset misses a field with the same name, an EDatabaseError exception will be raised.

See also

TParam

  

Parameter description class.

TParam.Bound

  

Is the parameter value bound (set to fixed value).

TParam.AssignField

  

Copy value from field instance.

TDataset

  

Base class for records-based data-access.

TDataset.FieldByName

  

Search a field by name.


Documentation generated on: Nov 23 2024