Transaction.OnError not firing when running Script
Transaction.OnError not firing when running Script
Hi,
I have a TIBCScript component with a script in it, including a COMMIT statement.
I have an event handler for the transaction component OnError, the COMMIT fails (transaction stays active), but the OnError event on the transaction component is never firing.
When I use a TIBCQuery on the -same- transaction component, and do a COMMIT, the event fires.
When I manually call the Commit method on the transaction component, I get an exception.
What's going on here?
With regards,
Martijn Tonies
Upscene Productions
I have a TIBCScript component with a script in it, including a COMMIT statement.
I have an event handler for the transaction component OnError, the COMMIT fails (transaction stays active), but the OnError event on the transaction component is never firing.
When I use a TIBCQuery on the -same- transaction component, and do a COMMIT, the event fires.
When I manually call the Commit method on the transaction component, I get an exception.
What's going on here?
With regards,
Martijn Tonies
Upscene Productions
Hello Dimon,Dimon wrote:The next IBDAC build will be released by the end of this week.
I downloaded the latest, but this error doesn't seem to be fixed.
The "COMMIT" in the Script fires the Transaction.OnCommit event, but not the OnError event (the commit fails with "object in use" error), the exception reaches TApplicationEvents.OnException, thus not handled by the Transaction component.
Can you urgently re-check this, I was waiting for this fix!!
With regards,
Martijn Tonies
Upscene Productions
upscene wrote:Hello Dimon,Dimon wrote:The next IBDAC build will be released by the end of this week.
I downloaded the latest, but this error doesn't seem to be fixed.
The "COMMIT" in the Script fires the Transaction.OnCommit event, but not the OnError event (the commit fails with "object in use" error), the exception reaches TApplicationEvents.OnException, thus not handled by the Transaction component.
Can you urgently re-check this, I was waiting for this fix!!
With regards,
Martijn Tonies
Upscene Productions
Any news?
OK, never mind, I fixed it another way.upscene wrote:Please change that! How can I know if a "commit" has failed in TIBCConnection.OnError? It's much easier to check transaction errors in TIBCTransaction.
But please do change the Documentation on this as it says:
Occurs when processing errors that are raised during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others.
Class
TIBCTransaction
Syntax
property OnError: TIBCTransactionErrorEvent;
Remarks
Write the OnError event handler to process errors that occur during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others. Check the E parameter to get an error code.
Note: You should explicitly add IBCError unit to 'uses' list to use OnError event handler
With regards,
Martijn Tonies
Upscene Productions