Subject Re: [IBO] Rollback
Author hans@hoogstraat.ca
I did set this properperty to caRefresh, but made no difference.

I pop up a Cancel and Post button on IB_TransactionSource,OnDataChange.

Post just issues a Transaction.Commit
Cancel a Transaction.RollBack.

A populated table after an insert (or any modifications) the two
buttons pop up and a Transaction.RollBack deletes the last inserted
record followed by a refresh Grid hooked up to the table. Great,
Table back to state prior to Insert.

An unpopulated table does everything the same, except it doesn't
refresh its controls and the last inserted record stays visibile.
A manual refresh after the Transaction.RollBack shows thing proper
and the fact the actual roll back took place.

With the caRefresh change I had my application hang a few times, solidly
by playing with inserting,deleting, rollback, when using a emty table.
However I upgraded to Ea from Dd at the same time.

Don't worry, the manual refresh worjs well.

Best regards,
Hans

=====================================================





Jason Wharton wrote:
>
> Ah ha! I see. I thought I had it setup to be published there but apparently
> I don't. I will add it to the published section.
>
> The reason you are seeing the behavior you are is due to the setting of this
> property internally to caInvalidateCursor. What this does is cause a refresh
> to take place for you if the transaction is going to commit or rollback. If
> all the records have been fetched from the cursor then there is no need for
> the transaction to close the cursor and have it refreshed to restore it.
>
> You can set it to something else by using
> MyIBOQuery.InternalDataset.CommitAction := caRefresh. Then, every time there
> is a Commit or Rollback the dataset will refresh as you are expecting.
>
> HTH,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> ----- Original Message -----
> From: <hans@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Saturday, August 11, 2001 3:46 PM
> Subject: Re: [IBO] Rollback
>
> > On a TIB_Query, I can find a CommitAction property,
> > but I can't find one on what I use, namely TIBOQuery.
> >
> > ===================================================
> >
> >
> > Jason Wharton wrote:
> > >
> > > There is property on the datasets called CommitAction. What is it?
> > >
> > > Jason Wharton
> > > CPS - Mesa AZ
> > > http://www.ibobjects.com
> > >
> > > ----- Original Message -----
> > > From: <hans@...>
> > > To: <IBObjects@yahoogroups.com>
> > > Sent: Saturday, August 11, 2001 3:07 PM
> > > Subject: Re: [IBO] Rollback
> > >
> > > > In order to Transaction.RollBack, I have then set as follows:
> > > >
> > > > TMSServer.Connected := False;
> > > > IBOTransaction.AutoCommit := False;
> > > > IBOTransaction.Isolation := tiCommitted;
> > > > IBOTransaction.ServerAutoCommit := False;
> > > > ...
> > > > DataBaseName and Password stuff
> > > > ...
> > > > TMSServer.Connected := True;
> > > >
> > > > Best regards
> > > > Hans
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/