Kbase P130066: Getting error 12300 - Could not get lock for record during save-row-changes when AppServer connects
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/1/2008 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1B
SYMPTOM(s):
Getting error 12300 when AppServer connects to database via TCP/IP
Could not get lock for record during save-row-changes. (12300)
Same works fine if the database is connected via shared memory
CAUSE:
Shared record lock gets created while the save-row-changes method if the database is connected via TCP/IP
FIX:
Surround the code containing the save-row-changes with a DO TRANSACTION block, then the scoping remains as it should be, even with a remote
connection. Example :
procedure Store_OrderLine:
define input parameter dataset for dsOrderLine.
define query qOrder for order.
define data-source srcOrder for query qOrder sports2000.order keys
(ordernum).
define data-source srcOrderLine for sports2000.orderline keys
(ordernum,Linenum).
buffer ttOrder :handle:attach-data-source(data-source srcOrder
:handle,?,?,?).
buffer ttOrderLine:handle:attach-data-source(data-source
srcOrderLine:handle,?,?,?).
do transaction:
for each biOrderLine:
buffer biOrderLine:save-row-changes().
end.
end.
buffer ttOrder :handle:detach-data-source().
buffer ttOrderLine:handle:detach-data-source().
end procedure. /* Store_OrderLine */