Midware TMWBuffer.Fields

From Overbyte
Revision as of 12:12, 5 May 2011 by Marie (talk | contribs) (Created page with ' Main page -> Midware component reference -> TMWBuffer -> Fields == Defini…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Definition

property Fields[nlndex:Integer]: Stringn;

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>