Difference between revisions of "Midware TMWBuffer.Fields"

From Overbyte
Jump to navigation Jump to search
(Created page with ' Main page -> Midware component reference -> TMWBuffer -> Fields == Defini…')
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
== Definition ==
 
== Definition ==
  
  '''property''' Fields[nlndex:Integer]: '''Stringn''';
+
  '''property''' Fields[nIndex:Integer]: String;
  
 
== Description ==
 
== Description ==

Latest revision as of 14:56, 14 May 2011

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>