Re: Duplicating records in sub-datablocks
Date: Wed, 18 Jun 2003 10:52:08 -0700
Message-ID: <3EF0A6C8.A51024B7_at_exxesolutions.com>
Jan Schaefer wrote:
> Hi,
>
> I'm using Forms 6 and want to duplicate a record and all records that
> are stored in sub-datablocks and are connected to the record in the main
> datablock.
>
> It's easy to duplicate the record in the main datablock:
>
> go_block('xyz_block');
> create_record;
> duplicate_record;
> change_some_fields_to_avoid_exception;
>
> But how do I duplicate all the records in the sub-datablock(s) that
> belong to the record in the main datablock?
>
> Thanks for your help in advance,
>
> Jan
Assuming your records have primary keys that can not be duplicated ... I would write a stored procedure.
Pass the primary key from the parent block to the stored procedure and let it do the rest.
Then refresh the form with EXECUTE_QUERY;
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed Jun 18 2003 - 19:52:08 CEST