Subject Re: [IBO] will timeout forceclosed end an OAT in active state?
Author harrietckm
Thank you Helen for all the information. -Harriet

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
>
> At 03:10 PM 11/10/2005 +0000, you wrote:
> >will the TIBOdatabase timeout forceclosed property close a
> >transaction in an active state?
>
> Yes, as long as ForceClosed is greater than zero. A transaction is
only
> "active" if it is started but neither committed nor rolled back.
From the
> help text for ForceClosed:
>
> "All datasets of this transaction will be closed as a result of
this
> action. If AutoCommit is set true, a transaction Close will attempt
a
> commit and if an exception is raised it will force a rollback."
>
> >We want to let IBObjects manage the transactions for us but we
don't
> >want to leave the transaction open.
>
> Then don't use AutoCommit.
>
>
> >We're using TIBOQueries with implicit default transaction and a
single
> >TIBODatabase.
> >
> >we use a button to force a database->Commit and that does roll the
> >OAT over but doesn't end the transaction. The transaction sits in
a
> >state of "active".
>
> Calling Commit does force a hard commit on an Autocommit
transaction but it
> doesn't change the behaviour of Autocommit, i.e. to start a new
transaction
> as soon as the existing one is committed or rolled back.
>
>
> >How can we close the transaction when the app is just sitting
there?
>
> Don't use Autocommit.
>
> >We're unhappy to use a timer because want to only measure time when
> >user is inactive.
>
> Can't comment on this because I don't understand it.
>
>
> >In our application we have many tabs with TMS DB string grids and
we
> >use TIBOQueries that have <default> for their IB_Transaction and
the
> >queries are pointing to a single TIBODatabase that has the default
> >for "DefaultTransaction" and
> >database.autocommit=true
> >database.isolation = tiCommit
> >default properties for database.timeoutproperties
>
> The default for ForceClosed is 0.
>
>
> >query.pessimistic locking = false
> >query.commitAction = caInvalidateCursor
> >query.RequestLive = true
>
> The application will be "cold" when all datasets are closed (the
situation
> following a ForceClosed). RequestLive applies only to open
datasets.
>
>
> >We want the transaction to end but the data to remain visible in
the
> >grid.
>
> Then don't use Autocommit. You'll also have to remember that any
data left
> in the buffers after the hard commit is invalid. When work resumes
> afterwards, the next Dataset.Open will refresh the buffers.
>
>
> >Do we have to use explicit TIBOTransaction and do manual commits
> >instead of using the TIBODatabase and have autocommit=true?
>
> No to the first, yes to the second. You handle the embedded
transaction
> just like any other transaction: its properties and methods are
surfaced
> in the TIBODatabase.
>
>
> >What are the settings for the implicit <default> transaction that
> >TIBODatabase and TIBOQuery have?
>
> Queries don't "have transactions", other than in the context of the
> connection. Because you are using only the embedded transaction,
you are
> only concerned with the defaults of that transaction. You can
inspect the
> defaults by dropping a fresh TIBODatabase into a new project and
inspecting
> the transaction-related properties.
>
> Helen
>