[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'db' (#fcl)

TStringField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Field class to handle ansistring fields

Declaration

Source position: db.pas line 446

type TStringField = class(TField)

  class procedure CheckTypeSize(); override;

protected

  function GetAsBoolean; override;

  function GetAsDateTime; override;

  function GetAsFloat; override;

  function GetAsLongint; override;

  function GetAsString; override;

  function GetAsVariant; override;

  function GetDataSize; override;

  function GetDefaultWidth; override;

  procedure GetText(); override;

  function GetValue();

  procedure SetAsBoolean(); override;

  procedure SetAsDateTime(); override;

  procedure SetAsFloat(); override;

  procedure SetAsLongint(); override;

  procedure SetAsString(); override;

  procedure SetVarValue(); override;

public

  constructor Create(); override;

  

Create a new instance of the TStringField class

  procedure SetFieldType(); override;

  property FixedChar: Boolean; [rw]

  

Is the string declared with a fixed length ?

  property Transliterate: Boolean; [rw]

  

Should the field value be transliterated when reading or writing

  property Value: String; [rw]

  

Value of the field as a string

published

  property Size;

  

Maximum size of the string

end;

Inheritance

TStringField

  

Field class to handle ansistring fields

|

TField

  

Provide access to the contents of a single field in a record

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TStringField is the class used whenever a dataset has to handle a string field type (data type ftString). This class overrides some of the standard TField methods to handle string data, and introduces some properties that are only pertinent for data fields of string type. It should never be necessary to create an instance of TStringField manually, a field of this class will be instantiated automatically for each string field when a dataset is opened.

See also

TField

  

Provide access to the contents of a single field in a record

TWideStringField

  

Field class for widestring data

TDataset

  

Base class for records-based data-access

The latest version of this document can be found at lazarus-ccr.sourceforge.net.