Sign in Join
FPDoc Onlineexperiment

TParams.CopyParamValuesFromDataset procedure

Member of TParamspublicIn unit DB

Copy parameter values from the fields in a dataset.

Declaration

pascal
procedure 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 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.