Difference between revisions of "Midware TMWBuffer.WriteFields"

From Overbyte
Jump to navigation Jump to search
 
 
Line 11: Line 11:
 
<syntaxhighlight lang="delphi">
 
<syntaxhighlight lang="delphi">
 
  MWBuffer1.Rewrite;  // Clear TMWBuffer content
 
  MWBuffer1.Rewrite;  // Clear TMWBuffer content
    MWBuffer1.WriteFields(TRUE, ['Hello', 'World'];
+
MWBuffer1.WriteFields(TRUE, ['Hello', 'World'];
    for I := 1 to 3 do
+
for I := 1 to 3 do
        MWBuffer1.WriteField(FALSE, [I]);
+
    MWBuffer1.WriteField(FALSE, [I]);
    MWBuffer1.WriteField(FALSE, ['Finished']);
+
MWBuffer1.WriteField(FALSE, ['Finished']);
    MWBuffer1.WriteFields(TRUE, ['Another', 'Record'];
+
MWBuffer1.WriteFields(TRUE, ['Another', 'Record'];
 
</syntaxhighlight>
 
</syntaxhighlight>
 
This sample code will write two records. The first will contains 6 fields: 'Hello', 'World', '1', '2', '3', 'Finished'. The seond will contain two fields: 'Another', 'Record'.
 
This sample code will write two records. The first will contains 6 fields: 'Hello', 'World', '1', '2', '3', 'Finished'. The seond will contain two fields: 'Another', 'Record'.

Latest revision as of 15:26, 14 May 2011

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

Definition

procedure WriteFields(NewRec:Boolean;Args:array of const);

Description

Example

<syntaxhighlight lang="delphi">

MWBuffer1.Rewrite;  // Clear TMWBuffer content
MWBuffer1.WriteFields(TRUE, ['Hello', 'World'];
for I := 1 to 3 do
    MWBuffer1.WriteField(FALSE, [I]);
MWBuffer1.WriteField(FALSE, ['Finished']);
MWBuffer1.WriteFields(TRUE, ['Another', 'Record'];

</syntaxhighlight> This sample code will write two records. The first will contains 6 fields: 'Hello', 'World', '1', '2', '3', 'Finished'. The seond will contain two fields: 'Another', 'Record'.