Sign in Join
FPDoc Onlineexperiment

TField.Required property

Member of TFieldpublishedIn unit DB

Does the field require a value.

Declaration

pascal
property Required: Boolean read FRequired write FRequired 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.