[progress Communities] [progress Openedge Abl] Forum Post: Re: Businessentity - Strange...

  • Thread starter Thread starter smat-consulting
  • Start date Start date
Status
Not open for further replies.
S

smat-consulting

Guest
Haven't played with Business Entity at all, but the symptom I encountered frequently when using triggers. Somehow the error-status gets lost when the transaction is being backed out when a non-unique (or other trigger error) is encountered. Every transaction in my programs has an ON ERROR UND, RETRY on the transaction block, includes an IF RETRY THEN .. ELSE DO: END. , and within the transaction, just before the end also includes a VALIDATE NO-ERROR. IF THEN: ... UNDO, RETRY. END. I'm working with WebSpeed, so no errors are displayed on the screen - obviously. My error-handling writes a message to the message-queue, the content of which is then sent to the browser upon finishing the request. With the above logic I get all the messages and always at least know there was a problem and the transaction is backed out. Heads-up, though: when unique index is attempted to be broken (or some other low-level DB stuff) you get only a retry but no error-status nor return-value from the trigger. In that case, all you have is an error-number in _msg(1), when RETRY is executed... I was thinking about adding a unique-index verification in the trigger, but haven't found the time to play with that...

Continue reading...
 
Status
Not open for further replies.
Back
Top