RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TPacketDataSet.AssignCurValues Method (TDataSet)

Updates the current field value for each field in the packet dataset.

Pascal
procedure AssignCurValues(Source: TDataSet); overload;
procedure AssignCurValues(const CurValues: Variant); overload;
C++
__fastcall AssignCurValues(TDataSet Source);
__fastcall AssignCurValues(const Variant CurValues);

When a resolver component encounters an update error, it calls AssignCurValues to set the CurValue property of fields before triggering the OnUpdateError event handler. 

If AssignCurValues is passed a dataset as the Source parameter, then for each field in the packet dataset, the CurValue property is set to the value of the field with the same name in the source dataset.  

If AssignCurValues is passed a Variant array as the CurValues parameter, then each entry in the array is used to assign the CurValue property of a field in the packet dataset. CurValues can have one of two forms: an array of field values, or an array of Variant arrays, where each of those arrays has two elements: a field name and a value. In the first form, field values are assigned by position. In the second form, fields are located based on name and the CurValue property assigned accordingly. 

 

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