Subject | RE: [IBO] Re: CachedUpdates |
---|---|
Author | IBO Support List |
Post date | 2012-02-14T18:40:56Z |
Here is what appears to fix this issue:
Please apply this patch in IB_Components.pas.
procedure TIB_BDataset.SysProcessUpdates( AProcess: TIB_CachedUpdatesProcess
);
var
oldState: TIB_DatasetState;
tmpTrn: TIB_Transaction;
tmpSeq: int64;
begin
oldState := State;
DisableControls;
try
try
try
if KeyLinksExist then
NodeList.BufferSynchroFlags := BufferSynchroFlags
else
NodeList.BufferSynchroFlags := [];
FPostToServerTran := nil;
FPostToServerSeq := 0;
tmpTrn := nil;
tmpSeq := 0;
try
NodeList.ProcessUpdates( AProcess );
finally
tmpTrn := FPostToServerTran;
tmpSeq := FPostToServerSeq;
if Assigned( FPostToServerTran ) then
begin
FPostToServerTran := nil;
FPostToServerSeq := 0;
end;
end;
if Assigned( tmpTrn ) then
if ( tmpSeq = tmpTrn.ActivateSequence ) then
tmpTrn.Activate;
finally
FState := oldState;
if Active then
begin
SysScrollCurrent( false, false, false );
StateChanged;
DataChange;
end;
end;
finally
CheckTransactionFlagForCachedUpdates;
end;
finally
EnableControls;
end;
end;
Please let me know if this resolves the issue.
Thanks,
Jason
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of l_gilbert_fr
Sent: 14 February 2012 02:39 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Re: CachedUpdates
Hi Jason,
I made a little test application while I was waiting an answer. :-)
I post it in few minutes.
Click on checkbox in order 1, 2, 3, and 4.
1: open database employee ; CachedUpdates is true for the table.
2: change the name of the first employee.
3: Call of CheckBrowseMode
4: Call of ApplyUpdates.
You can show transaction states at every steps : Transaction.Started,
Transaction.InTransaction, and Transaction.TransactionIsActive.
All is working fine until step 4. When I call ApplyUpdates, the
TransactionIsActive switch to false.
Regards,
Laurent.
--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...>
wrote:
Please apply this patch in IB_Components.pas.
procedure TIB_BDataset.SysProcessUpdates( AProcess: TIB_CachedUpdatesProcess
);
var
oldState: TIB_DatasetState;
tmpTrn: TIB_Transaction;
tmpSeq: int64;
begin
oldState := State;
DisableControls;
try
try
try
if KeyLinksExist then
NodeList.BufferSynchroFlags := BufferSynchroFlags
else
NodeList.BufferSynchroFlags := [];
FPostToServerTran := nil;
FPostToServerSeq := 0;
tmpTrn := nil;
tmpSeq := 0;
try
NodeList.ProcessUpdates( AProcess );
finally
tmpTrn := FPostToServerTran;
tmpSeq := FPostToServerSeq;
if Assigned( FPostToServerTran ) then
begin
FPostToServerTran := nil;
FPostToServerSeq := 0;
end;
end;
if Assigned( tmpTrn ) then
if ( tmpSeq = tmpTrn.ActivateSequence ) then
tmpTrn.Activate;
finally
FState := oldState;
if Active then
begin
SysScrollCurrent( false, false, false );
StateChanged;
DataChange;
end;
end;
finally
CheckTransactionFlagForCachedUpdates;
end;
finally
EnableControls;
end;
end;
Please let me know if this resolves the issue.
Thanks,
Jason
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of l_gilbert_fr
Sent: 14 February 2012 02:39 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Re: CachedUpdates
Hi Jason,
I made a little test application while I was waiting an answer. :-)
I post it in few minutes.
Click on checkbox in order 1, 2, 3, and 4.
1: open database employee ; CachedUpdates is true for the table.
2: change the name of the first employee.
3: Call of CheckBrowseMode
4: Call of ApplyUpdates.
You can show transaction states at every steps : Transaction.Started,
Transaction.InTransaction, and Transaction.TransactionIsActive.
All is working fine until step 4. When I call ApplyUpdates, the
TransactionIsActive switch to false.
Regards,
Laurent.
--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...>
wrote:
>more
> Your description isn't sufficiently detailed for me to grasp what your
> problem is. Would you describe things in more detail please? Also, if
> possible, perhaps you could show me a sample app and then I can fix it
> readily if I see what is wrong.Behalf
>
> Thanks,
> Jason
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Of l_gilbert_frthe
> Sent: 13 February 2012 02:22 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] CachedUpdates
>
> Hi all,
>
> I found a little problem with my 10 years application since I switch to
> DELPHI XE and last version of IBO.
>
> I use DataSet.CachedUpdates in my work.
> I call DataSet.ApplyUpdates when I want to validate the modifications in
> cache. (The modifications move from the cache to the 'transaction' level).
> This was working very well but now, when I call DataSet.ApplyUpdates the
> TransactionIsActive switch to false and then I can't know if I must commit
> the transaction in an upper level of my application.
>
> I don't see why it's not working anymore...
>
> Regards,
>
> Laurent.