Description


"All default coding and examples concerning store/commit/release should be modified. now it is: 1. store 2. inform user about status of store 3. complete the transaction , trigger: if ($status < 0) message ""Store error number %%$status."" rollback endif This should be: 1. store 2. end the transaction 3. inform the user about the transaction , trigger: if ($status < 0) rollback message ""Store error number %%$status."" endif"

Use Case


"The time a database is locked should be as short as possible. To do so, a commit or a rollback is applied. When the store (or commit) fails, a rollback should clean up the mess and the user is informed. The user is most of the times not interested in the store, but want to know about the transaction: what is in my database? In the Uniface examples and in the default coding in the is: message $text(1500) , error rollback In the online help: , trigger: if ($status < 0) message ""Store error number %%$status."" rollback endif This is fine, but what if the developer changes the message to: message/error ""Store error..."" rollback The message shows a popup and the rollback is only performed after the confirmation of the message. The database is locked for a longer time than needed. The user just left his desk to go out for lunch, is not aware of the database lock. Is it good practice to first clean up and the inform. So: rollback message/error ""Store error number %%$status."""

Importance


What is most important after a failing store? Inform the user or clean up the mess? I think it is more important to clean up and after that inform the user. Every developer knows this, I'm sure. The Uniface manual and defaults first inform the user and after that clean up and release the locking. I see a lot of situations where the message is changed to message/error. In the cases the locking is completely depending on a user action. And lots of developers follow the examples of Compuware. But are not aware of the impact of the small change the make by adding /error to the message statement.

Type


Proc Code

Operating System


Not Applicable

Status


Open

Leave a Reply