TField class
Provide access to the contents of a single field in a record.
Declaration
TField = class(TComponent)Inheritance
Descends from it: TBinaryField TBlobField TBooleanField TDateTimeField TNumericField TObjectField TStringField TVariantField
Description
TField is an abstract class that defines access methods for a field in a record, controlled by a
TDataset instance.
It provides methods and properties to access the contents of the field in the current record. Reading one of the AsXXX properties
of
TField will access the field contents and return the contents as the desired type. Writing one of the AsXXX properties will
write a value to the buffer represented by the
TField instance.
TField is an abstract class, meaning that it should never be created directly.
TDataset instances always create one
of the descendent classes of TField, depending on the type of the underlying data.
See also
Properties
AsBCD | public | Access the field's contents as a BCD (Binary coded Decimal). |
AsBoolean | public | Access the field's contents as a Boolean value. |
AsBytes | public | Retrieve the contents of the field as an array of bytes. |
AsCurrency | public | Access the field's contents as a Currency value. |
AsDateTime | public | Access the field's contents as a TDateTime value. |
AsExtended | public | |
AsFloat | public | Access the field's contents as a floating-point (Double) value. |
AsLongint | public | Access the field's contents as a 32-bit signed integer (longint) value. |
AsLongWord | public | Access field contents as 32-bit unsigned integer (longword/cardinal). |
AsLargeInt | public | Access the field's contents as a 64-bit signed integer (longint) value. |
AsInteger | public | Access the field's contents as a 32-bit signed integer (longint) value. |
AsSingle | public | |
AsString | public | Access the field's contents as an AnsiString value. |
AsAnsiString | public | Return field contents as an ANSI string. |
AsUnicodeString | public | Field contents as a UnicodeString. |
AsUTF8String | public | Field contents as a UTF8 String. |
AsWideString | public | Access the field's contents as a WideString value. |
AsVariant | public | Access the field's contents as a Variant value. |
AttributeSet | public | Not used: dictionary information. |
Calculated | public | Is the field a calculated field ? |
CanModify | public | Can the field's contents be modified. |
CurValue | public | Current value of the field. |
DataSet | public | Dataset this field belongs to. |
DataSize | public | Size of the field's data. |
DataType | public | The data type of the field. |
DisplayName | public | User-readable fieldname. |
DisplayText | public | Formatted field value. |
EditMask | public | Specify an edit mask for an edit control. |
EditMaskPtr | public | Alias for EditMask. |
FieldNo | public | Number of the field in the record. |
IsIndexField | public | Is the field an indexed field ? |
IsNull | public | Is the field empty. |
NewValue | public | The new value of the field. |
Offset | public | Offset of the field's value in the dataset buffer. |
Size | public | Logical size of the field. |
Text | public | Text representation of the field. |
ValidChars | public | Characters that are valid input for the field's content. |
Value | public | Value of the field as a variant value. |
OldValue | public | Old value of the field. |
LookupList | public | List of lookup values. |
FieldDef | public | Fielddef associated with this field. |
Alignment | published | Alignment for this field. |
CustomConstraint | published | Custom constraint for the field's value. |
ConstraintErrorMessage | published | Message to display if the CustomConstraint constraint is violated. |
DefaultExpression | published | Default value for the field. |
DisplayLabel | published | Name of the field for display purposes. |
DisplayWidth | published | Width of the field in characters. |
FieldKind | published | The kind of field. |
FieldName | published | Name of the field. |
HasConstraints | published | Does the field have any constraints defined. |
Index | published | Index of the field in the list of fields. |
ImportedConstraint | published | Constraint for the field value on the level of the underlying database. |
KeyFields | published | Key fields to use when looking up a field value. |
LookupCache | published | Should lookup values be cached. |
LookupDataSet | published | Dataset with lookup values. |
LookupKeyFields | published | Names of fields on which to perform a locate. |
LookupResultField | published | Name of field to use as lookup value. |
Lookup | published | Is the field a lookup field. |
Origin | published | Original fieldname of the field. |
ParentField | published | |
ProviderFlags | published | Flags for provider or update support. |
ReadOnly | published | Is the field read-only. |
Required | published | Does the field require a value. |
Visible | published | Should the field be shown in grids. |
Methods
AccessError | protected | |
CheckInactive | protected | |
CheckTypeSize | protected | |
Change | protected | |
Bind | protected | |
DataChanged | protected | |
FreeBuffers | protected | |
GetAsBCD | protected | |
GetAsBoolean | protected | |
GetAsBytes | protected | |
GetAsCurrency | protected | |
GetAsDateTime | protected | |
GetAsExtended | protected | |
GetAsFloat | protected | |
GetAsLargeInt | protected | |
GetAsLongint | protected | |
GetAsLongWord | protected | |
GetAsInteger | protected | |
GetAsVariant | protected | |
GetOldValue | protected | |
GetAsSingle | protected | |
GetAsString | protected | |
GetAsAnsiString | protected | |
GetAsUnicodeString | protected | |
GetAsUTF8String | protected | |
GetAsWideString | protected | |
GetCanModify | protected | |
GetClassDesc | protected | |
GetDataSize | protected | |
GetDefaultWidth | protected | |
GetDisplayName | protected | |
GetCurValue | protected | |
GetNewValue | protected | |
GetIsNull | protected | |
GetParentComponent | protected | Returns the parent component. |
GetText | protected | |
HasParent | protected | Does the component have a parent ? |
Notification | protected | Called by components that are freed and which received a FreeNotification. |
PropertyChanged | protected | |
ReadState | protected | Read the component's state from a stream. |
SetAsBCD | protected | |
SetAsBoolean | protected | |
SetAsBytes | protected | |
SetAsCurrency | protected | |
SetAsDateTime | protected | |
SetAsExtended | protected | |
SetAsFloat | protected | |
SetAsLargeInt | protected | |
SetAsLongint | protected | |
SetAsLongWord | protected | |
SetAsInteger | protected | |
SetAsVariant | protected | |
SetAsSingle | protected | |
SetAsString | protected | |
SetAsAnsiString | protected | |
SetAsUnicodeString | protected | |
SetAsUTF8String | protected | |
SetAsWideString | protected | |
SetDataset | protected | |
SetDataType | protected | |
SetNewValue | protected | |
SetSize | protected | |
SetParentComponent | protected | Set the parent component. |
SetParentField | protected | |
SetText | protected | |
SetVarValue | protected | |
Create | public | Create a new TField instance. |
Destroy | public | Destroy the TField instance. |
Assign | public | Copy properties from one TField instance to another. |
AssignValue | public | Assign value of a variant record to the field. |
Clear | public | Clear the field contents. |
FocusControl | public | Set focus to the first control connected to this field. |
GetData | public | Get the data from this field. |
IsBlob | public | Is the field a BLOB field (untyped data of indeterminate size). |
IsValidChar | public | Check whether a character is valid input for the field. |
RefreshLookupList | public | Refresh the lookup list. |
SetData | public | Save the field data. |
SetFieldType | public | Set the field data type. |
Validate | public | Validate the data buffer. |
Events
OnChange | published | Event triggered when the field's value has changed. |
OnGetText | published | Event to format the field's content. |
OnSetText | published | Event to set the field's content based on a user-formatted string. |
OnValidate | published | Event to validate the value of a field before it is written to the data buffer. |
Inherited
From TComponent (69)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
