dhowells
14th February 2002, 23:23
I have a simple update statement that is not working in Baan 5.

Example:
select tccom112.*
from tccom112 for update
where tccom112.itbp = "123456"
selectdo
tccom112.cfcg = "ABC"
db.update(ttccom112)
endselect
commit.transaction()

When the code is hit i get an error message that the record is not locked and aborts the session.

Any ideas????

~Vamsi
14th February 2002, 23:36
Is this in a process session? If not what section is this code in?

Kees de Jong
14th February 2002, 23:58
Didn't you set a db.retry.point()?

This is necessary to create a delayed lock.

dhowells
15th February 2002, 14:59
I have tried this with and without retry points. I have tried this in a type 1 and a type 4. To try to narrow down the problem I have made a temporary session that will execute the code on cont.process. So basically the session starts up and then the code can be executed.

evesely
15th February 2002, 16:13
Did you try both using db.retry.point() before the select statement AND using db.update(ttccom112, db.retry )? In my experience, both are needed.

Kees de Jong
15th February 2002, 20:25
Indeed

I overlooked the missing db.retry, but this indeed is mandatory as well.