bizen99
2nd June 2003, 17:23
Hi,

I have develoved a library that updates a table.

but this library is called from other program, in this program is there other update, Can I have a 'commit' only in the library without affect the main program?

thanks in advise

dorleta
2nd June 2003, 19:11
No it will affect to all the programs who call this library.

Better is put never a commit or db.retry in a function of a library who is called from a lot of program. The right way to to this ( I think ) is NEVER put a db.retry or commit in this kind of function and call this function linked to the logic transaction of the calling programs for example:

main.table.io:
after write:
my.dll.update.mytable( par1, par2)

or
program 1:

db.retry.point()

select mitable.*
from mitable for update
where.....
selectdo
my.dll.update.mytable( par1, par2)
endselect
commit.transaction()

if you work of this way you avoid a lot of trobles.

good luck