Andron
24th October 2002, 08:28
It is necessary to make update inside update:

db.retry.point()
select f1, f2, ..., fn from table1 for update
where ......
selectdo
.............
db.update(table1, db.retry)
db.retry.point()
select d1, d2, ...., dn from table2 for update
where ..........
selectdo
..................
db.update(table2, db.retry)
endselect
................
endselect
commit.transaction()

This code is correctly?

zacharyg
24th October 2002, 09:08
Hello Andron,

I don't believe so because you have already started a transaction with the first db.retry.point(). Why would you want to do the update this way.

I would suggest removing the second db.retry.point() because I assume your two updates are logically one unit of work.

carice
24th October 2002, 09:29
This won't work because you start twice db.retry.point When he has to jump to the db.retry.point the program can't know which db.retry.point he has to go. You can update two tables if you just use one db.retry.point

Andron
24th October 2002, 09:44
Means it is necessary to make so:

db.retry.point()
select f1, f2, ..., fn from table1 for update
where ......
selectdo
.............
db.update(table1, db.retry)
| no db.retry.point this
select d1, d2, ...., dn from table2 for update
where ..........
selectdo
..................
db.update(table2, db.retry)
endselect
................
endselect
commit.transaction()

zacharyg
24th October 2002, 10:38
Yes, Andron that's correct.

baanprog
26th October 2002, 01:47
Plese know that you can set a db.retry.point() and start updating diffrent tables within that db.retry, it only prepares the update data.Physicaly the update will occur only when u commit the transaction with commit.transaction().Knowing this difference is essential for process sessions in which you can have multiple updates and single commit or multiple commits.(you can have dummy commit's too sometimes)