Subject RE: [IBO] Commit retaining
Author Jason Wharton
a) is the correct answer. The server's cursor of the dataset being
processed is what gets retained.

SavePoint and CommitRetaining (as far as IBO is concerned) do exactly the
same thing on the server. The difference is with SavePoint it doesn't
actually flag your explicit transaction (started with a call to
StartTransaction) as ended and InTransaction remains true.

There is a new addition to server capabilities that allows for a savepoint
but it is handled directly with DSQL and it has the ability to be rolled
back to if the savepoint is named. This is going to be difficult to deal
with in IBO as far as some of the more advanced capabilities I have like DML
caching go, but common sense can be applied when using all these
capabilities not to have them walk on the other's feet.

Jason Wharton
www.ibobjects.com


> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Josh Higgs
> Sent: Wednesday, July 06, 2005 5:17 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Commit retaining
>
>
> Morning
>
> Can someone please explain what CommitRetaining is meant to
> be used for:
>
> a) Iterating through a dataset, and making updates in the
> same txn context,
> while periodically CommitRetaining, so that the main
> iterating dataset does
> not close and maintains its cursor position and "old"
> snapshot view of it's
> data. The TXN is fully committed and must be immediately
> followed by a
> txn.StartTransaction
>
> or
>
> b) Iterating through a dataset, making updates in the same
> txn context,
> while periodically CommitRetaining in order to save the work, but the
> Transaction is not fully finished yet. A rollback will
> rollback to the most
> recent CommitRetaining.
>
> I get the feeling b) is actually describing a SavePoint, and
> a) is the true
> description of a CommitRetaining.
>
> So,
>
> 1) What exactly is "Retained" in a CommitRetaining -
> obviously not the
> Transaction.
>
> 2) Since the txn is fully committed in a CommitRetaining,
> where does the
> dataset that is kept open get's it's remaining data from?
>
> Thanks
>
> Josh