[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Provide access to the contents of a single field in a record
Source position: db.pas line 261
type TField = class(TComponent) |
||
public |
||
constructor Create(); override; |
|
Create a new TField instance |
destructor Destroy; override; |
|
Destroy the TField instance |
procedure Assign(); override; |
|
Copy properties from one TField instance to another |
procedure AssignValue(); |
|
Assign value of a variant record to the field. |
procedure Clear; virtual; |
|
Clear the field contents. |
procedure FocusControl; |
|
Set focus to the first control connected to this field. |
function GetData(); |
|
Get the data from this field |
class function IsBlob; virtual; |
|
Is the field a BLOB field (untyped data of indeterminate size). |
function IsValidChar(); virtual; |
|
Check whether a character is valid input for the field |
procedure RefreshLookupList; |
|
Refresh the lookup list |
procedure SetData(); |
|
Save the field data |
procedure SetFieldType(); virtual; |
|
Set the field data type |
procedure Validate(); |
|
Validate the data buffer |
AsBCD: TBCD; |
|
Access the field's contents as a BCD (Binary coded Decimal) |
AsBoolean: Boolean; |
|
Access the field's contents as a Boolean value. |
AsCurrency: Currency; |
|
Access the field's contents as a Currency value. |
|
Access the field's contents as a TDateTime value. |
|
AsFloat: Double; |
|
Access the field's contents as a floating-point (Double) value. |
AsLongint: LongInt; |
|
Access the field's contents as a 32-bit signed integer (longint) value. |
|
Access the field's contents as a 64-bit signed integer (longint) value. |
|
|
Access the field's contents as a 32-bit signed integer (longint) value. |
|
AsString: ; |
|
Access the field's contents as an AnsiString value. |
AsWideString: WideString; |
|
Access the field's contents as a WideString value. |
AsVariant: variant; |
|
Access the field's contents as a Variant value. |
AttributeSet: ; |
|
Not used: dictionary information |
Calculated: Boolean; |
|
Is the field a calculated field ? |
CanModify: Boolean; |
|
Can the field's contents be modified. |
CurValue: Variant; |
|
Current value of the field |
|
Dataset this field belongs to |
|
|
Size of the field's data |
|
|
The data type of the field. |
|
DisplayName: ; |
|
User-readable fieldname |
DisplayText: ; |
|
Formatted field value |
EditMask: TEditMask; |
|
Specify an edit mask for an edit control |
EditMaskPtr: TEditMask; |
|
Alias for EditMask |
FieldNo: LongInt; |
|
Number of the field in the record |
IsIndexField: Boolean; |
|
Is the field an indexed field ? |
IsNull: Boolean; |
|
Is the field empty |
Lookup: Boolean; |
|
Is the field a lookup field |
NewValue: Variant; |
|
The new value of the field |
Offset: Word; |
|
Offset of the field's value in the dataset buffer |
|
Logical size of the field |
|
Text: ; |
|
Text representation of the field |
|
Characters that are valid input for the field's content |
|
Value: variant; |
|
Value of the field as a variant value |
OldValue: variant; |
|
Old value of the field |
|
List of lookup values |
|
published |
||
|
Alignment for this field |
|
|
Custom constraint for the field's value |
|
|
Message to display if the CustomConstraint constraint is violated. |
|
|
Default value for the field |
|
DisplayLabel: ; |
|
Name of the field for display purposes |
DisplayWidth: LongInt; |
|
Width of the field in characters |
|
The kind of field. |
|
FieldName: ; |
|
Name of the field |
HasConstraints: Boolean; |
|
Does the field have any constraints defined |
Index: LongInt; |
|
Index of the field in the list of fields |
|
Constraint for the field value on the level of the underlying database |
|
KeyFields: ; |
|
Key fields to use when looking up a field value. |
LookupCache: Boolean; |
|
Should lookup values be cached |
|
Dataset with lookup values |
|
|
Names of fields on which to perform a locate |
|
|
Name of field to use as lookup value |
|
Origin: ; |
|
Original fieldname of the field. |
|
Flags for provider or update support |
|
ReadOnly: Boolean; |
|
Is the field read-only |
Required: Boolean; |
|
Does the field require a value |
Visible: Boolean; |
|
Should the field be shown in grids |
|
Event triggerd when the field's value has changed |
|
|
Event to format the field's content |
|
|
Event to set the field's content based on a user-formatted string |
|
|
Event to validate the value of a field before it is written to the data buffer |
|
end; |
|
Provide access to the contents of a single field in a record |
|
| | ||
| | ||
| | ||
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.
|
Base class for records-based data-access |
|
|
Class to describe one field in a record in a dataset |
|
|
Collection of #fcl.db.TField instances |