Subject Re: [IBO] AutoCommit
Author George
--- In, Helen Borrie <helebor@...> wrote:
> At 10:22 PM 1/09/2006, you wrote:
> >This is probably an elementary misunderstanding on my part.
> >
> >I am converting a VCL BDE app to Firebird.
> >All old controls have been converted appropriately in accordance
> >the guidance notes.
> >
> >I have added a TIBOTransaction and set it as the default
> >for the TIBODatabase which has taken the place of the BDE database.
> No, it really doesn't do anything. TIBODatabase already has an
> embedded transaction, which is a TIBOTransaction. Compare this
> (which is there for compatibility with the VCL) with the native IBO
> model, which will *create* a default transaction if a
> is not explicitly defined.
> So - if you are sticking with the old BDE single transaction model,
> TIBOTransaction is superfluous to requirements right now.
> >(It is my understanding this will ensure all transactions by a
> >user will be kept together)
> No. Every transaction exists in its own right and is initiated in
> context which involves one and only one user; but there is no such
> thing as "keeping transactions together". A "user" (or, more
> precisely, a session) might have several transactions running
> concurrently but they are not aware of one another, or connected to
> one another.
> >Without fully understanding why, I have also added a TIB_Session
> >referenced it from the TIBODatabase.
> That's OK; but, again, unnecessary unless you are creating and
> destroying sessions during the course of usage, e.g. threading
> operations. If you're not threading, just let IBO create the
> IB_Session. What can be useful is a TIB_SessionProps, which gives
> you access to a number of session-level properties at
> design-time. It will just hook up to the default session.
> If you are using an explicit TIB_Session on your mainform then make
> sure it's the first thing in the creation order. (That's also true
> for sessions you create at runtime for threads).
> >I have set AutoCommit to true in the TIBOTransaction and the
> >TIBODatabase.
> >
> >When testing data entry or edit, using the existing TNavBar
> >changes get posted but not committed. Even exiting the app does not
> >commit any updates.
> >
> >Isolation is tiCommitted.
> >
> >Any clues as to what I have missed?
> Confusion in settings in your query? TIBOQuery has IB_Transaction
> and IB_Connection properties. My guess is that you have some
> confused configurations in
> 1. Remove the TIBOTransaction and the TIB_Session, 'cause you
> need them at this stage.
> 2. Nil out the DatabaseName property of the IBODatabase, or place
> some friendly name in there. Instead, set the Server, Path and
> Protocol properties.
> 3. Nil out AliasName if you have anything there.
> 4. Clear out anything you have in the Params property of the
> 5. Nil out the DatabaseName property of the dataset[s] and select
> the IB_Connection property instead.
> 6. If you *must* have Autocommit true, set it on the IBODatabase.
> Helen

Many thanks - I think.
Clearly much more homework required, but I will do as you suggest
then work on understanding it.