Data.DB.TField.SetAsVariant

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: protected
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TField

Delphi

procedure SetAsVariant(const Value: Variant); virtual;

C++

virtual void __fastcall SetAsVariant(const System::Variant &Value);

Description

Attempts to set the value of the field with the given Variant value.

Descendants of TField that represent certain fields (fields that can hold any value specified through a Variant) can override the SetAsVariant method to set the value of the field with the given Variant Value.

If the given Value is Null, then the field is cleared. If SetAsVariant fails to set the field with the given Value, an exception is raised.

See Also