Board index » delphi » Paradox Memo Assignment Problem - Delphi 1- Syntax?

Paradox Memo Assignment Problem - Delphi 1- Syntax?

I can't seem to assign a memo field from one table to another in delphi 1
but it works in delphi 2

This does not work in delphi 1 but does in delphi 2 it gives a compilation
error....

FirstTableMyFormattedMemo.Value := SecondTableMyFormattedMemo.Value;

Can I do anything with this?

FirstTable.FieldByName('Notes').AsWHAT :=
SecondTable.FieldByName('Notes').AsWHAT;

 

Re:Paradox Memo Assignment Problem - Delphi 1- Syntax?


John Francis Lundy (jflu...@aol.com) wrote:
: I can't seem to assign a memo field from one table to another in delphi 1
: but it works in delphi 2

: This does not work in delphi 1 but does in delphi 2 it gives a compilation
: error....

: FirstTableMyFormattedMemo.Value := SecondTableMyFormattedMemo.Value;

: Can I do anything with this?

look at this:

 (FirstTable.FieldByName('Notes') as tmemofield).AsWHAT :=
 (SecondTable.FieldByName('Notes') as tmemofield).AsWHAT;

a fieldbyname function call returns a tfield, but not a tmemofield. the
assign procedures for standard fields and memofields differ. an explicit
typecase is neccessary.

try e.g.

(firsttable.fieldbyname('notes') as tmemofield).assign (
   (secondtable.fieldbyname('notes') as tmemofield);

--
-----------------------------------------------------
geb...@studserv.stud.uni-hannover.de

Toleranz ist das unbehagliche Gefuehl,
der Andere koennte am Ende vielleicht
doch recht haben.
                        Robert Forst

Other Threads