Subject Re: [IBO] dssEdit
Author bullardjuk <comesailing@btinternet.com>
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 05:57 AM 26/01/2003 +0000, you wrote:
>
> >but I presume this just sets things into
> >an insert state. Then qryonA.execute. This seems to work, but am I
> >doing a sensible thing. There are so many apparently different ways
> >of achieving an end in IBO and I never know which is best !!
>
> Well, this isn't one of 'em.
>
> Helen
Thanks again Helen.
So I try to use DataPump.
I have a table of 'bookings'
I have a table of 'addresses'; a table of 'people'; a table of 'items'
Each booking can have one or more 'addresses'
each address one or more people.
each person one or more items.
['As I was going to St Ives' etc].

So I make a Master-detail-subdetail-subsubdetail link between the
tables then I only have to select from bookings where booknum = 12345
and I have the lot contrained.

Then I send the booking record, then the first address record then
the first person at that first address, then that person's first
item, then his second item ..etc Then the second person at the first
address. And so on in a nested fashion.

I can do this in a 'while not eof .... next' loop with loops within
loops, but how to do it with a datapump?
Or is there another way...perhaps not enforcing the ref integrty
until all is sent?

If i have 4 datapumps One for each table can I break into the
bookings datapump flow at 'after fetch row'or somewhere to set the
address datapump going etc etc ?

ANother problem I cannot see my way around with a datapump is if I
use a trigger to set the primary keys at the server how can I get the
values to put as foreign keys in the level below ?

Any further help welcomed


Dave