spartacus
14th August 2002, 17:55
In a when.field.changes section of a maintain session I try to update an other table.
Update seems to run well, but later the error: "error 206 (record is not locked)" occurs on the main table of the session.

Si I tried to remove the commit.transaction() after my db.update... but that results in "transaction ist on, can't continue".

Hope somebody have some suggestions.


Spartacus

BaanTech
14th August 2002, 18:37
When exactly does the error 206 occur ? What type of form ?

The problem might be related to a coded db action on the
main table where the main.io 'select for update' pointer has
been lost by the previous commit. There may be a need to reselect the main table after the commit or else defer the commit
until after db.commit on the main table.

spartacus
14th August 2002, 18:59
It is a moc-form.
The error occurs most the times when I left the function which I wrote for update my own table. In the debugger: when I step from the closing bracket ot that function, after the update of my own table is done.

Spartacus

lbencic
14th August 2002, 19:49
It's tough to get that section to work well for updating another table. As suggested, you are wrestling with the standard program's commits & retries.

See this post for some suggestions:
http://www.baanboard.com/baanboard/showthread.php?s=&threadid=6061

spartacus
14th August 2002, 20:06
Hi Ibencic,

thanks, that seams to work. I put my things in a "after.update.db.commit" section.


Spartacus