Venkat
16th December 2004, 06:30
Hi folks,

Is there any predefined variable or function in Baan which states that a db.rety.point has been set.

something like......
if db.retry.set then....
else
db.retry.point()......


Regards
Venkat

NPRao
16th December 2004, 08:49
I am not sure, if there is a predefined variable to check there.

Alternatively, there are other ways to check. Refer to the links -


db.retry.hit() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_db_operations_db_retry_hit)

Retry Points (http://www.baanboard.com/programmers_manual_baanerp_help_functions_database_handling_retry_points)

The function db.retry.hit() returns 0 when the retry point is generated - that is, the first time the code is executed. It returns a value unequal to 0 when the system returns to the retry point through the database layer.

Venkat
16th December 2004, 11:16
Thanks NPR
venkat

Venkat
16th December 2004, 13:08
Hi,

There is a glitch in using db.retry.hit()..it gets set to -1 when no retry points are set. After a db.retry.point is called the db.retry.hit returns 0. After commit too it returns a 0. (no retries)
for eg..i wrote this code
function main()
{
ret = 0
message("1 -> %d", ret)

ret = db.retry.hit()
message("2 -> %d", ret)

db.retry.point()
ret = db.retry.hit()
message("3 -> %d", ret)

db.lock.table(tvfmps092)
ret = db.retry.hit()
message("4 -> %d", ret)

commit.transaction()
ret = db.retry.hit() ---------------> here the value of ret is 0
message("5 -> %d", ret)

db.retry.point()
ret = db.retry.hit()
message("6 -> %d", ret)

commit.transaction()
message("%s", prog.name$)
}

After the commit the value of db.retry.hit shud be -1..
Any workarounds

Venkat

Hitesh Shah
16th December 2004, 17:49
It will be true when error is encountered in commit transaction and retryp point is hit. So it can be checked between db.retry.point() and commit transactionn() to handle the error incase of db.retry.

ranjankool
14th June 2010, 14:39
Hi,
Is there any Pre-defined Vaiables to Set db.retry in ERP LN.