Page 1 of 1

Transaction.OnError not firing when running Script

Posted: Fri 29 Oct 2010 08:50
by upscene
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

Posted: Mon 01 Nov 2010 14:40
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.

Posted: Mon 01 Nov 2010 14:43
by upscene
Dimon wrote:Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.
Good, any idea when we can expect the new release?

Posted: Mon 01 Nov 2010 14:52
by Dimon
The next IBDAC build will be released by the end of this week.

Posted: Fri 19 Nov 2010 16:05
by upscene
Dimon wrote:The next IBDAC build will be released by the end of this week.
Hello Dimon,

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

Posted: Tue 23 Nov 2010 11:55
by upscene
upscene wrote:
Dimon wrote:The next IBDAC build will be released by the end of this week.
Hello Dimon,

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?

Posted: Wed 24 Nov 2010 08:44
by Dimon
The TIBCTransaction.OnError event arises only when two or more connections are associated with the transaction. When only one connection is assigned to the transaction, then the OnError event of the TIBCConnection class arises.

Posted: Wed 24 Nov 2010 08:48
by upscene
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.

Posted: Wed 24 Nov 2010 14:56
by upscene
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.
OK, never mind, I fixed it another way.

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

Posted: Thu 25 Nov 2010 08:57
by Dimon
Thank you for your inquiry. We will correct this information in the help in the next IBDAC build.