Board index » delphi » TMemoField question

TMemoField question

How can I copy the contents of a TMemoField to another TMemoField on a
different table?

        Luis Barreira

 

Re:TMemoField question


On 26 Sep 1996 02:05:41 GMT, "Luis Barreira" <fme...@eden.dei.uc.pt>
wrote:

Quote
>How can I copy the contents of a TMemoField to another TMemoField on a
>different table?

>    Luis Barreira

Yes...look at GetTextBuf and GetTextLen...this will allow you to copy
it to a PChar...use SetTextBuf to pass the pchar back to the memo
field...

f...@alpha.c2.org

While Alpha is down please send to squea...@c2.net

Key can be found at BAL's PGP Public Key Server

Type bits/keyID    Date       User ID
pub  1024/A3A6F2B5 1996/07/25 Flux<f...@alpha.c2.org>
          Key fingerprint =  D5 53 91 0D A1 57 9D E7  6B FA 78 04 86 8B F2 AD

Re:TMemoField question


Luis Barreira wrote in an article appearing in comp.lang.pascal.delphi.databases:

Quote
>How can I copy the contents of a TMemoField to another TMemoField on a
>different table?

Speaking for Delphi 2...

Look at the TMemoField's Assign method.

The TMemoField also has an undocumented .Value property.

Both of these compile, and I think both will work--but I haven't tried it.

  ToMemoField.Value := FromMemoField.Value;

  ToMemoField.Assign(FromMemoField);

The first one is the one that is documented.

--
Kevin Davidson (kwdav...@calweb.com)
* Every scribe who has been instructed in the kingdom of heaven
  is like the head of a household who brings from his storeroom
  both the new and the old. Matthew 13:52 (NAB-RNT)

Other Threads