I just can't get this to work:
The Paradox database has a memo field
I want to manipulate the text data in that field off-screen (e.g. in a
TStringList), then put it back in the database.
Should be simple, but after 1 hour I give up ;-(
Example code, anyone?
Thanks in advance,
Jan
-----------------------------------------------------------------------
Jan Doggen Masters Software mas...@xs4all.nl
P.O. Box 697 2300 RA Leiden The Netherlands
-----------------------------------------------------------------------
** Specialists in multimedia software for education and presentation **
-----------------------------------------------------------------------
Usage of this email address for commercial purposes costs US$ 50 per
message. By using this email address you agree to this condition.
-----------------------------------------------------------------------
...
MyStringList.Clear;
MyStringList.text := MyTable.FieldByName('Fieldname').asString;
MyStringList.Add('AnyText');{for a new line}
MyTable.Edit;
MyTable.FieldByName('Fieldname').asString := MyStringList.text;
MyTable.Post;
...
Jan Doggen schrieb in Nachricht <6vfh4b$ms...@forums.borland.com>...
>The Paradox database has a memo field
>I want to manipulate the text data in that field off-screen (e.g. in a
>TStringList), then put it back in the database.
The TMemoField component and a string list object are
assignment-compatible. That is, you can use the Assign method of one to
copy the contents of the other.
To copy from memo field to string list object:
SL.Assign(Table1Notes);
The above assumes an existing string list object (such as a TStringList)
named SL and a persistent field object Table1Notes for a memo field named
Notes accessed through a TTable component named Table1. If you are not
using persistent field objects, typecast the value from the Fields property
or FieldByName method as a TMemoField.
SL.Assign((Table1.FieldByName('Notes') as TMemoField));
To copy from string list object to memo field:
Table1Notes.Assign(SL);
//////////////////////////////////////////////////////////////////////////
Steve Koterski "What is success in this world? I would say
Technical Publications it consists of four simple things: to live
INPRISE Corporation a lot, to love a lot, to laugh a lot, and
http://www.inprise.com/delphi from it all, to learn a lot."
-- Richard J. Needham