Subject RE: [IBO] IB_Transaction.Close
Author Helen Borrie
At 01:33 PM 10/10/2005 +1000, you wrote:
> > At 11:04 PM 9/10/2005 +1000, you wrote:
> > >What's the neatest way to "close" a transaction if you want all
> > the queries
> > >using the transaction to also close and you're too lazy to close them
> > >individually?
> > >I call IB_Transaction.Commit, and then what?
> >
> > Iterate through its Datasets[] array (from 0 to DatasetCount - 1), test
> > each for Active and if Active then Close
>fascinating! the for loop reveals that for each "real" or my dataset using
>the transaction, there are another two unnamed datasets present for
>IB_Queries but only one when IB_Cursor is used - which correlates with my 16
>_datasetcount when 5 IB_Queries and 1 IB_Cursor is connected.
>These unnamed queries have SQLSelect text present which match the named
>Heaven knows (without digging for hours thru source code) how this comes
>about. Anyone know?

Yup. IBO maintains multiple cursors for ib_queries - this is what makes
them "scrollable" and also allows the "moving window" on large
datasets. It's fine to loop through them according to DatasetCount if
you're closing them. Fb/IB don't support a scrolling cursor. The
unidirectional cursor is TIB_Cursor: one object, one cursor.