Board index » delphi » copying ole field from one table to another

copying ole field from one table to another

I am attempting to copy a paradox ole field from one table to another.  I've
tried Table1.fieldbyname('fieldone').asole (or asparadoxole) =
Table2.fieldbyname('fieldone').asole (or aspardoxole).  Is there a simple
way to do this?  I can't easily copy the record because I am incrementing a
number field in table1 as part of the copy.   Would it be easier to simply
copy the record then update my numeric field so it incremented?   Thanks
 

Re:copying ole field from one table to another


DestTable.FieldByName('OleField').Assign(SourceTable.FieldByName('OleField')
);

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

Re:copying ole field from one table to another


Quote
>I am attempting to copy a paradox ole field from one table to another.  I've
>tried Table1.fieldbyname('fieldone').asole (or asparadoxole) =
>Table2.fieldbyname('fieldone').asole (or aspardoxole).  Is there a simple
>way to do this?

Use Assign

Table1.fieldbyname('fieldone').assign(table2.fieldbyname('fieldone'));
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads