Subject Re: [IBO] savepoint vs commitretainning difference?
Author Helen Borrie
At 03:29 AM 10/07/2003 +0000, you wrote:
>what is the difference between the two?

A savepoint marks the end of a group of POSTED (but not committed)
rows. The idea of a savepoint is to make it possible to undo postings back
to the marked point, while keeping the other rows in a posted state.

Commitretaining is a commit. Savepoints disappear once the posted rows are
committed.


>my another question is that if I did this
>ib_transaction.commitretaining this means to commit all the
>transaction I have made, right?

Commit or commitretaining applies to one transaction. Either one will
commit all of the posted work in all of the statements that are within that
transaction.

>what if I did this
>ib_query1.ib_transaction.commitretaining? does this mean that only
>the transaction I have made with ib_query1 will be commited and none
>of the other ib_querys .... right?

Wrong. Commit and commitretaining are methods of a transaction object, not
of a statement object. Each statement (query) has the ib_transaction
property. If you don't set it explicitly to a transaction object, it is
set implicitly to the <defaulttransaction> of the connection object. If
this is what you did with all of your queries, then all of them are inside
a single transaction context and all will have their posted work committed
when the transaction.commit or commitretaining is called.

Helen