Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TField.Value

Value of the field as a variant value.

Declaration

Source position: db.pas line 468

public property TField.Value : variant
  read GetAsVariant
  write SetAsVariant;

Description

Value can be used to read or write the value of the field as a Variant value. When setting the value, the value will be converted to the actual type of the field as defined in the underlying data. Likewise, when reading the value property, the actual field value will be converted to a variant value. If the field does not contain a value (when IsNull returns True), then Value will contain Null.

It is not recommended to use the Value property: it should only be used when the type of the field is unknown. If the type of the field is known, it is better to use one of the AsXXX properties, which will not only result in faster code, but will also avoid strange type conversions.

See also

TField.IsNull

  

Is the field empty.

TField.Text

  

Text representation of the field.

TField.DisplayText

  

Formatted field value.


Documentation generated on: Oct 27 2024