Page 1 of 1
Executing a COMMIT in TIBCScript.DataSet does not fire event
Posted: Tue 15 Dec 2009 16:33
by upscene
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
Posted: Thu 17 Dec 2009 08:56
by Plash
TIBCScript executes some statements without using DataSet. For transaction control commands the TIBCScript component calls the corresponding methods of TIBCTransaction.
Posted: Thu 17 Dec 2009 09:03
by upscene
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.
Posted: Fri 18 Dec 2009 10:59
by Plash
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.
Posted: Fri 18 Dec 2009 11:13
by upscene
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.
Posted: Tue 22 Dec 2009 09:17
by Plash
We will add these events in the next IBDAC build.
Posted: Tue 22 Dec 2009 09:20
by upscene
Plash wrote:We will add these events in the next IBDAC build.
Thank you, that helps.