Datasnap.Provider.TPacketDataSet.AssignCurValues

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Datasnap.Provider.pas
Datasnap.Provider.hpp
Unit: Datasnap.Provider
Parent: TPacketDataSet

Delphi

procedure AssignCurValues(Source: TDataSet); overload;
procedure AssignCurValues(const CurValues: Variant); overload;

C++

void __fastcall AssignCurValues(Data::Db::TDataSet* Source)/* overload */;
void __fastcall AssignCurValues(const System::Variant &CurValues)/* overload */;

Description

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

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.

See Also