Subject Re: [IBO] Differnce of IBX and IBO / Transaction-wise
Author Helen Borrie
At 07:49 PM 09-12-01 +0100, you wrote:
>I have been using IBX with InterBase for over a year now, however for a new
>project I am avaluating IBO. As I can see IBO is handling a lot of the
>transaction-work that I using IBX had to do myself. However how do I control
>transactions in IBO when I have to.

Inspect the TIBODatabase - as you will observe, it defaults to making Autocommit true. Change this to False to get explicit transaction control.

>In IBX i have often made a form (eg. a Orderform containen the order head
>and the order lines) containing a Ok and a Cancel button. Hitting OK would
>commit my work and Cancel would simply do a Rollback. However as I can see
>IBO commit each time I "save" an orderline, hence prevents me form doing a
>rollback !?

In fact, if Rollback ever succeeded in this scenario then your OK button would have been performing a Post of the dataset, not a commit of the transaction. If you need users to control whether work is committed or rolled back, you'll need to know that Post updates the new record version on the server but does not commit the transaction.

There is a lot of material at about transactions in Firebird/InterBase and how IBO works with them. Also do make use of the on-line FAQ.

>PS: I am using the IBOxxx compontent (over the IB_xxx) since I have to work
>with 3rd party components.

Some thoughts:

You'll find that IBOxxx gives you a lot more support for master/detail (your scenario above) than you had with IBX.

Much of the Help for the IBOxxx components will be found in the Delphi helpfiles - these comps provide 100% emulation of the VCL equivalents. They DON'T emulate IBX though! :))

Any properties & methods of the IBOxxx comps that cannot be found in their own help topics in the IBO help file will be discovered in the topics for the IB_xxx comps. The IBOxxx comps embed a lot of the native IBO functionality. Some of this is surfaced in the Object Inspector (e.g. KeyLinks, GeneratorLinks..), others you can reach through run-time code.

TIBODatabase encapsulates a TIB_Transaction and a TIB_Connection, so you will find out a lot about this component by reading the component help for those comps.


All for Open and Open for All
InterBase Developer Initiative ยท