Subject Re: [IBO] How might I do this?
Author Svein Erling Tysvaer
At 21:10 27.02.2003 +1100, you wrote:
> >Does anyone have a more elegant solution that I haven't thought of?
>
>Yes - a stored procedure in DatabaseB to perform the update, that accepts
>the relevant keys from DatabaseA as input parameters. Loop through
>DatasetA, picking up the parameters at each iteration and calling the proc
>in B. Of course, put the two connections inside the one transaction and
>use tiConcurrency to ensure that you don't get any recursion.

And then introduce a new variable into the table in DatabaseB which you set
to some value (I'd suggest that you use a generator, and pick a new value
before the first insert or update, but this may not be required) for all
modified or inserted records. After everything is inserted/updated, simply
delete all records in DatabaseB that doesn't have this value.

Set