Executing a COMMIT in TIBCScript.DataSet does not fire event

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Executing a COMMIT in TIBCScript.DataSet does not fire event

Post by upscene » Tue 15 Dec 2009 16:33

Hi,

I'm using a TIBCQuery assigned to TIBCScript.DataSet for better control over what's executed in the script.

In the AfterExecute event I check for the statement type (.SQLType property) and if it's a SQL_COMMIT, I make it visually clear that the transaction has committed.

However, the AfterExecute is never fired for a COMMIT in a Script.

Is this a bug?


With regards,

Martijn Tonies
Upscene Productions

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Dec 2009 08:56

TIBCScript executes some statements without using DataSet. For transaction control commands the TIBCScript component calls the corresponding methods of TIBCTransaction.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Thu 17 Dec 2009 09:03

Plash wrote:TIBCScript executes some statements without using DataSet. For transaction control commands the TIBCScript component calls the corresponding methods of TIBCTransaction.
COMMIT, ROLLBACK and START TRANSACTION are perfectly valid commands inside any InterBase/Firebird script, the Script component should support this and if you supply a method of executing in a DataSet, at least the AfterExecute should fire (even though it does not actually use that to execute the COMMIT) so I know it has executed a COMMIT.

I cannot use the methods of TIBCTransaction in this case.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 18 Dec 2009 10:59

Currently TIBCQuery does not support the transaction control commands and create/drop database commands. So script executes these commands without using TIBCQuery.

We'll consider the possibility of supporting these commands in TIBCQuery, but that is hardly to happen in the nearest future.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Fri 18 Dec 2009 11:13

Plash wrote:Currently TIBCQuery does not support the transaction control commands and create/drop database commands. So script executes these commands without using TIBCQuery.

We'll consider the possibility of supporting these commands in TIBCQuery, but that is hardly to happen in the nearest future.
As an alternative, could you add events to TIBCTransaction for OnCommit/OnRollback/OnStart ?

That way, I could work around the issue.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 22 Dec 2009 09:17

We will add these events in the next IBDAC build.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Tue 22 Dec 2009 09:20

Plash wrote:We will add these events in the next IBDAC build.
Thank you, that helps.

Post Reply