Difference between revisions of "Midware TMWBuffer.Fields"
Jump to navigation
Jump to search
(Created page with ' Main page -> Midware component reference -> TMWBuffer -> Fields == Defini…') |
|||
Line 3: | Line 3: | ||
== Definition == | == Definition == | ||
− | '''property''' Fields[ | + | '''property''' Fields[nIndex:Integer]: '''String'''; |
== Description == | == Description == |
Revision as of 12:17, 5 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>