Hello, we are experiencing a strange problem with locking and I was wondering if anyone had any suggestions. We have a batch process that runs commissions for our agencies. When we try to run this process, we get the "record is in use by another user". It had been using pessimistic buffering, but I switched to optimistic and get the same results.
It consistently happens on the same record # in our commdet (commission detail) table. However, this record is a newly inserted record by the process and no one else is accessing it. I suspended execution at the point we get that message and when I browse the table and try to modify ANY of the remaining newly inserted records, I get the same error message. The pseudo-code is something like:
SCAN ...
SCAN ...
IF <condition1>
SELECT commdet
APPEND BLANK
REPLACE ...
IF <condition2>
SELECT commdet
APPEND BLANK ...
REPLACE ...
...
ENDSCAN
ENDSCAN
Then later, there's a loop to populate a foreign key to link the new records to the correct record in yet another table.
SCAN ...
SCAN ...
REPLACE commdet.al_key_p WITH m.nALKey
=TABLEUPDATE(.T.)
...
ENDSCAN
ENDSCAN
It is at this REPLACE we get the error. We are running a Novell client and I have heard of some issues with locking under Novell. I know (I think?) I am the only person that could lock these records as this is within a transaction. Yet, it won't let me update. There are roughly 6000 new records being inserted. Any ideas??? I didn't write the code, I just inherited the project... Thanks in advance,
Jason
It consistently happens on the same record # in our commdet (commission detail) table. However, this record is a newly inserted record by the process and no one else is accessing it. I suspended execution at the point we get that message and when I browse the table and try to modify ANY of the remaining newly inserted records, I get the same error message. The pseudo-code is something like:
SCAN ...
SCAN ...
IF <condition1>
SELECT commdet
APPEND BLANK
REPLACE ...
IF <condition2>
SELECT commdet
APPEND BLANK ...
REPLACE ...
...
ENDSCAN
ENDSCAN
Then later, there's a loop to populate a foreign key to link the new records to the correct record in yet another table.
SCAN ...
SCAN ...
REPLACE commdet.al_key_p WITH m.nALKey
=TABLEUPDATE(.T.)
...
ENDSCAN
ENDSCAN
It is at this REPLACE we get the error. We are running a Novell client and I have heard of some issues with locking under Novell. I know (I think?) I am the only person that could lock these records as this is within a transaction. Yet, it won't let me update. There are roughly 6000 new records being inserted. Any ideas??? I didn't write the code, I just inherited the project... Thanks in advance,
Jason