I´m migrating a lot of apps from the Delphi 2007 bundled IB components to UniDAC and found that my statements are commited if I don´t manually start a transaction in the TUniConnection (the so called AutoCommit).
Is there a way to by pass this behaviour?. IB bundled components don´t need to start a transaction since they use the Firebird default one. Maybe not the best practice, but the (very large) code being migrated is based on such fact and does not start transactions. Only commits them. An AutoCommit property for the TUniConnection will be nice!
Also, IB component TIBDatabase (which is the equivalent to TUniConnection) has a "DefaultTransaction" property which is very handy since insted of checking the InTransaction property of the TIBDatabase it can be done in the TIBTransaction component.
Regards,
Alvaro Castiello
AutoCommit and Firebird
Hello,
We will add the AutoCommit option in one of the next UniDAC build.
The point is that UniDAC serves for working with different databases, and its functionality is common for all supported servers. That's why the UniConnection component doesn't have the DefaultTransaction property. You can use the UniConnection.InTransaction property for checking if the internal default transaction is active.
Also, if you are working only with Firebird, maybe you will be interested in using IBDAC components that are intended for working with InterBase, Firebird and Yaffil database servers. The IBCConnection has the DefaultTransaction and AutoCommit properties, the TIBCTable and TIBCQuery components have the AutoCommit properties as well. You can find more information about IBDAC here: http://www.devart.com/ibdac
We will add the AutoCommit option in one of the next UniDAC build.
The point is that UniDAC serves for working with different databases, and its functionality is common for all supported servers. That's why the UniConnection component doesn't have the DefaultTransaction property. You can use the UniConnection.InTransaction property for checking if the internal default transaction is active.
Also, if you are working only with Firebird, maybe you will be interested in using IBDAC components that are intended for working with InterBase, Firebird and Yaffil database servers. The IBCConnection has the DefaultTransaction and AutoCommit properties, the TIBCTable and TIBCQuery components have the AutoCommit properties as well. You can find more information about IBDAC here: http://www.devart.com/ibdac
-
- Posts: 7
- Joined: Tue 01 Feb 2011 16:21
Those are good news!, since the code being ported does not check InTransaction, only commits since it "trusts" the default connectionAndreyZ wrote:Hello,
We will add the AutoCommit option in one of the next UniDAC build.
The point is that UniDAC serves for working with different databases, and its functionality is common for all supported servers. That's why the UniConnection component doesn't have the DefaultTransaction property. You can use the UniConnection.InTransaction property for checking if the internal default transaction is active.
Unfortunately is not the case. Most of the apps are using FB but many others use Oracle. Again, trusting the default conection is not the best practice (and we are inserting InTransaction/StartTransaction pairs in the code), but for a fast, reliable porting, such property will be nice!AndreyZ wrote:Also, if you are working only with Firebird, maybe you will be interested in using IBDAC components that are intended for working with InterBase, Firebird and Yaffil database servers. The IBCConnection has the DefaultTransaction and AutoCommit properties, the TIBCTable and TIBCQuery components have the AutoCommit properties as well. You can find more information about IBDAC here: http://www.devart.com/ibdac
Regards,
Alvaro