Board index » delphi » Appending a new record that includes a memo field

Appending a new record that includes a memo field

How do I append a record that contains a memo field as one of its
fields?  In other words, I want the user's input (typed into a regular
TMemo) put into the Memo field of the record as the record is
appended.

Thank you,

Larry Guy
l...@sprynet.com
Laurent Guy
l...@m2.sprynet.com
Please include the full text on this note in any reply

 

Re:Appending a new record that includes a memo field


Larry,
AFAIK, you can't do it as part of an "AppendRecord", you have to do it
in a separate statement where you use "Assign" and the TMemo's Strings
property like this:

ttTable.FieldByName('MEMO').Assign(TMemo.Strings);

So, you would either use the Table's Append method and set the values
of each of the fields individually and then post the append, or you
could AppendRecord will all of the field values except the memo, then
edit the record, assign the memo, and post the record.

I hope this helps!

-Dell

On Wed, 20 May 1998 15:37:52 GMT, l...@m2.sprynet.com (Larry Guy)
wrote:

Quote
>How do I append a record that contains a memo field as one of its
>fields?  In other words, I want the user's input (typed into a regular
>TMemo) put into the Memo field of the record as the record is
>appended.

>Thank you,

>Larry Guy
>l...@sprynet.com
>Laurent Guy
>l...@m2.sprynet.com
>Please include the full text on this note in any reply

Re:Appending a new record that includes a memo field


thanks!  this really did the trick.

Larry

On Wed, 20 May 1998 22:18:36 GMT, dellnos...@healthsoft.com (Dell

Quote
Stinnett) wrote:
>Larry,
>AFAIK, you can't do it as part of an "AppendRecord", you have to do it
>in a separate statement where you use "Assign" and the TMemo's Strings
>property like this:

>ttTable.FieldByName('MEMO').Assign(TMemo.Strings);

>So, you would either use the Table's Append method and set the values
>of each of the fields individually and then post the append, or you
>could AppendRecord will all of the field values except the memo, then
>edit the record, assign the memo, and post the record.

>I hope this helps!

>-Dell

>On Wed, 20 May 1998 15:37:52 GMT, l...@m2.sprynet.com (Larry Guy)
>wrote:

>>How do I append a record that contains a memo field as one of its
>>fields?  In other words, I want the user's input (typed into a regular
>>TMemo) put into the Memo field of the record as the record is
>>appended.

>>Thank you,

>>Larry Guy
>>l...@sprynet.com
>>Laurent Guy
>>l...@m2.sprynet.com
>>Please include the full text on this note in any reply

Laurent Guy
l...@m2.sprynet.com
Please include the full text on this note in any reply

Other Threads