Kbase 14093: Version 8 and Transactions with the ADM
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Version 8 and Transactions with the ADM
PROGRESS VERSION 8 TRANSACTIONS WITH THE ADM
--------------------------------------------
TRANSACTIONS AND THE UPDATE PANEL 'SAVE ADD...'
----------------------------------------------
Progress has taken some steps when using the ADM to
start transactions that don't span User Interface
events and that keep the records in a no-lock
state as long as possible.
In the following example, when a user has a
SmartQuery and a SmartViewer linked together by
a Record Link and the standard update panel
with a save button, the record is originally found
in the viewer by default with share-lock status.
When the SAVE button is pressed a transaction is started:
Do transaction:
...assign....
end.
The SAVE button will cause the record to be re-found with an
exclusive lock so that it can be updated. This simplifies
the size and scope of the transaction so that it does not
span user interface events.
If you wish, an attribute of the SmartViewer instance can
be changed to find the records with no-lock instead of
share-lock. THis allows other users to look at the records
at the same time and perhaps even to update them.
If you hit the save button then Progress re-finds the
record with an exclusive lock and if someone has it then a
message will come up telling the user that record has been
changed and the new record data will be displayed. THe user
will have to re-enter their changes.
USE CAUTION WITH 'UPDATE COMMIT UNDO' PANEL
-------------------------------------------
THe other navigation panel with UPDATE and COMMIT and UNDO
buttons will start a transaction as soon as UPDATE is
pressed. It will not end until the COMMIT or UNDO has been
pressed. This can be useful when waiting to update and save
multiple records; however, it can be very dangerous because
the transaction can stay open for a long time (until Commit
is pressed). This means that if you go off and do other
unrelated activities, they will be part of the
transaction that was opened when the UPDATE button was
pressed. If you were to hit UNDO then the entire transaction
will be undone (even if you went off and did some unrelated
activity).
TRANSACTION LINK
----------------
A SmartViewer on the customer table may be linked to
a SmartViewer for the Order table (Order of Customer) by
a link of type TRANSACTION. This causes both objects to be
linked in the same transaction block. When you hit the SAVE
button they will all be saved and if you UNDO the
transaction, they will all be undone.
The transaction Link is for grouping different buffers in
the same transaction.
Progress Software Technical Support Note # 14093