Difference between revisions of "Midware TMWBuffer.WriteFields"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
|  (Created page with ' Main page ->  Midware component reference ->  TMWBuffer ->  WriteFields …') | |||
| 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']; | |
| − | + |  for I := 1 to 3 do | |
| − | + |      MWBuffer1.WriteField(FALSE, [I]); | |
| − | + |  MWBuffer1.WriteField(FALSE, ['Finished']); | |
| − | + |  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'.
