RAD Studio |  |

Accessing Field Values with the Default Dataset Property
See Also
Collapse All

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:

Copy Code

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

Copy Code

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

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

See Also

Displaying Field Component Values in Standard Controls

Accessing Field Values with a Dataset's Fields Property

Accessing Field Values with a Dataset's FieldByName Method

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!