Midware TMWBuffer.Fields

From Overbyte
Jump to navigation Jump to search

Main page -> Midware component reference -> TMWBuffer -> Fields

Definition

property Fields[nIndex:Integer]: String;

Description

The indexed Fields[] property gives access to the current record's fields. Fields are numbered starting from 0 up to FieldCount - 1. Fields property always returns data as a string. For blobs, use GetStreamField. See also FieldSize and FieldType.

Existing fields can be written by assigning Fields[]. The current value is replaced by new data. To add more fields, use AppendFields or WriteFields.

Example

<syntaxhighlight lang="delphi"> procedure TForm1.Button1Click(Sender: TObject); var

   Fld, Last : Integer;

begin

   Last := MWBuffer1.FieldCount - 1;
   for Fld := 0 to Last do
       Memo1.Lines.Add(MWBuffer1.Fields[Fld]);

end; </syntaxhighlight>