Page 1 of 1

Updating a memo field

Posted: Tue 16 May 2006 14:49
by ashlar64
Hello,

I am trying to update a memo field in a table. But when I do the statement below the memo field is given a True value. How can I get the text I want in it?




MyTable_Site_Upgrades->FieldValues["Notes"]= Memo_Upgrade_Notes->Lines;


Thanks!

Posted: Wed 17 May 2006 09:06
by Antaeus
Try using something like

Code: Select all

MyQuery->FieldByName("c_text")->Assign(Memo->Lines);
to load data from TMemo into TMemoField field and

Code: Select all

Memo->Lines->Assign(MyQuery->FieldByName("c_text"));
to load data from TMemoField into TMemo.
You can also use TDBMemo component that provides automatic editing of TMemoField.