problem with CachedUpdates and appending records

problem with CachedUpdates and appending records

Postby nowy » Fri 09 Jan 2009 09:19

Hello,

I have installed ODAC 6.70 in Delphi 2006 and noticed the following
problem: if I use VirtualTable component with CachedUpdates then
new appended records will never be applied.

It seems that records appended in cache mode will always get urFail flag
thus they will never be committed and disappear after CancelChanges.


here is the code demonstrating the problem:

Code: Select all
  VirtualTable1.CachedUpdates := true;
  VirtualTable1.Open;
  for i := 1 to 3 do
  begin
    VirtualTable1.Append;
    VirtualTable1.Post;
  end;
  VirtualTable1.CommitUpdates;
  Assert(VirtualTable1.RecordCount = 3);
  VirtualTable1.CancelUpdates;
  // after CancelUpdates RecordCount will be 0
  // but it should be 3, as we already committed updates
  Assert(VirtualTable1.RecordCount = 3);



Could you please fix it?

Thank you and regards
nowy
 
Posts: 3
Joined: Thu 10 Aug 2006 13:33

Postby Plash » Mon 12 Jan 2009 09:20

We have fixed this problem. The fix will be included in the next build of ODAC.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to VirtualDAC