transaction problem with ODBC

gaurab

New Member
Hello all,

I ve a problem with ODBC. Here is my situation :

A session is started to update a record in DB with lock ( default behaviour ). Also after some time another session is started which also tries to update the same record already in use ( before the first session is committed ). Thus the second session failed. And after some time the first session is committed, but the record wanted by the second session is still locked and even progress programs can not access that record, what might be the reason for this and how it could be solve ??

thanks in advance:

gaurab
 
I presume these are two seperate procedures , obvious answer is to wait for first procedure to finish especially if first procedure/session needs to be carried out before second session/procedure runs, if this is not the case then

find first (or for each) tablename no-lock (no-error) . or :
if avail tablename then
do:
(include do transaction to prevent upgrade of locks)
find current tablename exclusive-lock.
assign tablename.
end

the above will pevent the whole table being locked, which could enable the second session a better chance of acquiring the record, also
if locked allows you to logically deal with locked tables check it out in help pretty sure thats the syntax may not be.

so if locked wait 20 sec repeat until record is released if you narrow down your locking than the second session has a better chance of accessing the records.

hope that helps

si
 
Back
Top