Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

writing field values to a file

Posted on 2003-03-19
2
Medium Priority
?
130 Views
Last Modified: 2010-04-04
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['WordA'];
        Writeln(f);
        Next;
        end;
    end;
   CloseFile(f);
end;
0
Comment
Question by:syllvia
2 Comments
 
LVL 1

Accepted Solution

by:
jbshumate earned 200 total points
ID: 8170945
you need to be working with the lines field.

RichEdit2.Lines.Append(tbOldTerms.FieldValues['WordA'];

text is a single property not an array and you are correct you are just overwriting it each time.
0
 

Author Comment

by:syllvia
ID: 8171021
Thanks!!
s.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question