Hello,
The case is this: for every row in table A- I want to updates these records in table B, which points on A.ID
What I've managed to do:
- for ll_i = 1 to dw_a.RowCount()
if in b exists records for a get records from b do ds_b
ds_b.update
ds_b.commit
end loop
after loop:
dw_a.UPDATE
dw_a.commit
And it works, but there is a chance that, for one record in A, everything from B updates succesfully, but for next record somethings crashes, but i've already make one commit. I wish it acted more like a transaction.
So what I want - before updateing record from table A, check if records in B exists, if they do - append them to datastore, and after get all records:
ds_b.update
dw_a.update
ds_b.commit
dw_a.commit
In NVO object I have a datastore variable
datastore lds_test
...
...
lds_test.DataObject = 'records_from_b_for_a'
lds_test.retrieve(l_par_id)
To achieve something like this - RetreiveStart event and retrun code = 2 seems perfect, but since it is a local variable, the only thing I can do is:
lds_test.event retrievestart( )
Is it possible to "alter" such events to a local variable?
PB 2017 R3 Build 1858
Oracle 12c
So one portion of records goest through update, then another portion retrieves to datastore, removing old ones and if I trigger commit - ALL records will be commited?
Select statement prevents from situation You've mentioned. Thank You very much :)