anubhav.bansal
15th May 2007, 22:43
Hi All,
I am getting the error 201 "Record changed after delayed lock" for processing a specific SO in Generating Hard Allocation.For all the other SO it is working fine but giving this error for a particular SO.
Even If I remove all the code from selectdo and just put a db.update for tdsls045 and commit it it gives the same message.
Can anyone please suggest something.
Thanks in advance !!!

Anubhav Bansal

mark_h
15th May 2007, 23:37
Is that all the code for the session? What type of session is it? To me it looks like a transaction is already open.

anubhav.bansal
15th May 2007, 23:59
Hi Mark,
Here I am attaching the whole script but How come it is working for one SO and not for others.
Even i try to change the data through GTM for the erroreouns SO to check whether table is locked or not and it allows me.So I don't think It is database related issue as well.
I am running the session for SO only.


Anubhav

anubhav.bansal
16th May 2007, 01:57
I have analyzed it and found out that we I remove order by section from the select query then it works fine but by putting that it gives the same message.
I am not gettig why by oyder by section delayed lock error will come.
Please suggest on the same.

Anubhav

george7a
16th May 2007, 09:31
Hi,

I see some differences between the two SQL queries (doc & txt files). In the txt file there is more code in the selectdo section. I have tried the SQL in the doc file (without tdsls041.crte) and it works. Which SQL is relevant for you?

The following link has a good explanation for the "Delayed locks". It also explans when do you get the 201 error (EROWCHANGED) (http://www.baanboard.com/programmers_manual_baanerp_help_errors_201_EROWCHANGED) Have a look at:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_database_handling_locking

- George

mark_h
16th May 2007, 21:36
I have analyzed it and found out that we I remove order by section from the select query then it works fine but by putting that it gives the same message.
I am not gettig why by oyder by section delayed lock error will come.
Please suggest on the same.

Anubhav

I do not think it is DB related. Are there any other updates(even in a library)being hit inside this update? Trace through it for one that works - then trace through it for one that does not work. Look for any extra code that does or does not get executed in the case where it does not work. The actual problem could be coming from somewhere else.