Subject RE: [IBO] duplicate a record including children
Author Jason Wharton
Jeff,

> I use this method to duplicate a record with no problems:
>
> srcVariant := ib_query1['COL1;COL2;COL3'];
> ib_query1.append;
> ib_query1['COL1;COL2;COL3'] := srcVariant;
>
> How do I extend this code so that I can copy or duplicate the details
> in a master-detail structure?

Take the old parent ID and the new parent ID and then do something like
this:

INSERT INTO <table> ( <field list> )
select ( <field list with new parent ID> )
from <table>
where <clause selecting records with old parent ID>

HTH,
Jason Wharton