Board index » delphi » copy as memo from table to table (paradox)

copy as memo from table to table (paradox)

Gil,

Try Table1.(Fieldbyname('memofld1')as
TMemoField).Assign(Table2.Fieldbyname('memofld2')as TMemoField);

Remember without doing the cast you are calling TField's assign method
and not TMemoField's assign method. (Not really certain you need to
cast Memofld2 in the above.)

It gets a lot less convoluted if you use persistent field objects:

Table1MemoFld1.Assign(Table2MemoFld2);

Bob
---
Sent using Virtual Access 5.01 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

 

Re:copy as memo from table to table (paradox)


tbl2.fieldvalues['memo']:=tbl1.fieldvalues['memo'];

At least I don't remember the above syntax ever not working for me.

Cheers,
JB

"Gil Yoktan" <g...@tadiad.co.il> a crit dans le message news:
3c737ce9_2@dnews...

Quote
> D6PRO
> Hello !
> I want to copy a Memo field from table to table.In both tables the field
has
> the same definition.
> I tried
> - tbl2.fieldbyname('memo').value := tbl1.fieldbyname('memo').value - no
luck
> - tbl2.fieldbyname('memo').Assign(tbl1.fieldbyname('memo').value) - no
luck
> - tbl2.fieldbyname('memo').Assign(tbl1.fieldbyname('memo').AsString) - no
> luck
> I'm sure there is a way to do it...  TIA   Gil Yoktan

Re:copy as memo from table to table (paradox)


- tbl2.fieldbyname('memo').Assign(tbl1.fieldbyname('memo'))

--
Bill
(TeamB cannot answer questions received via email)

Re:copy as memo from table to table (paradox)


Other Threads