Subject [IBO] Re: TIB_Cursor Commits -- Transactions
Author Bill Gage
I have been going through all the tutorials and online documentation
and help file. I somewhat have an idea of how transactions work,
but I may not be using them appropriately.

I will try and return with some more specific questions.

--- In, Lester Caine <lester@l...> wrote:
> Bill Gage wrote:
> > Then let me gain some greater understanding.
> > If I open a query with a TIB_Cursor and the query returns 20,000
> > records. And almost each line will be edited as the cursor is
> > scrolled through. When is the appropriate time to start a
> > transaction and commit the transaction. The way I have been
> > it now is.
> If you are processing 20000 records do you need to bring them all
> one at a time to the client? The proper way to do this would be to
> create SQL to do the job on the server.
> > I open the cursor and before I edit the record I start the
> > transaction. Then after I post the record I commit the
> > transaction. Is this not the right way to manage the
> > This method seems to work, however if there is a better or more
> > faster way I would love to know how.
> Again we need to know what you are doing to the record. It you are
> manually updating 20000 records one at a time, then a commit after
> entry might be fine. If you are reading and automatically
processing the
> data, then a start before the batch and a commit at the end would
be fine.
> > Is there an document I can refer to for the appropriate time to
> > start and commit transactions? Or even some general guidelines
> > using transactions?
> This really is just a matter of a unit of work. If you are
possessing an
> order with hundreds of line items, then you might want to start a
> transaction and not commit until the whole order is entered. Any
> problems any you can roll back to the start. 20000 records, I
> expect manual data to be perhaps 30 or 40 records on a page of
> copy, so you would process each page and then commit. IBO will
> the times it needs to open a new transaction automatically, and
> 'refresh' that via timeouts to prevent problems on the server, so
> 'interfering' more than necessary will just mean that you may get
> best performance.
> --
> Lester Caine
> -----------------------------
> L.S.Caine Electronic Services