Show: Delphi C++
Display Preferences

Accessing Field Values with the Default Dataset Property

From RAD Studio XE2
Jump to: navigation, search

Go Up to Working with field components Index

The most general method for accessing a field's value is to use Variants with the FieldValues property. For example, the following statement puts the value of an edit box into the CustNo field in the Customers table:

Customers.FieldValues['CustNo'] := Edit2.Text;
Customers->FieldValues["CustNo"] = Edit2->Text;

Because the FieldValues property is of type Variant, it automatically converts other datatypes into a Variant value.

See Also

Personal tools
Previous Versions
In other languages