Skip to content

TField.Required

Does the field require a value.

Declaration

Source position: db.pas line 494

published property Required: Boolean default False;

Description

Required determines whether the field needs a value when posting the data: when a dataset posts the changed made to a record (new or existing), it will check whether all fields with the Required property have a value assigned to them. If not, an exception will be raised. Descendents of TDataset will set the property to True when opening the dataset, depending on whether the field is required in the underlying data engine. For fields that are not required by the database engine, the programmer can still set the property to True if the business logic requires a field.

See also

Name Description
TDataset.Open Activate the dataset: Fetch data into memory.
ReadOnly Is the field read-only.
Visible Should the field be shown in grids.