syllvia
asked on
writing field values to a file
Hi,
I want to write the field values of a table to a RichEdit.
So far it iterates through the table and writes only the last field - I guess it writes every next field over the previous one - I tried to write an end of line marker with Writeln thinking it would act like pressing the Enter key.. (pathetic, eh)
What should I do??
Thanks!
s.
procedure TmfStyler.ToolButton1Click (Sender: TObject);
f: TextFile;
begin
AssignFile(f, 'c:\OldTerms.txt');
Rewrite(f);
with tbOldTerms do
begin
First;
while not EOF do
begin
RichEdit2.Text := tbOldTerms.FieldValues['Wo rdA'];
Writeln(f);
Next;
end;
end;
CloseFile(f);
end;
I want to write the field values of a table to a RichEdit.
So far it iterates through the table and writes only the last field - I guess it writes every next field over the previous one - I tried to write an end of line marker with Writeln thinking it would act like pressing the Enter key.. (pathetic, eh)
What should I do??
Thanks!
s.
procedure TmfStyler.ToolButton1Click
f: TextFile;
begin
AssignFile(f, 'c:\OldTerms.txt');
Rewrite(f);
with tbOldTerms do
begin
First;
while not EOF do
begin
RichEdit2.Text := tbOldTerms.FieldValues['Wo
Writeln(f);
Next;
end;
end;
CloseFile(f);
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
s.