Icon View Incident Report

Serious Serious
Reported By: Michael Haralabos
Reported On: 4/18/2005
For: Version 4.19 Build 1
# 2032 Using Cached Updates with Primary Index On RecordID Column Can Cause #9729 Duplicate Key Exception

With the following code, if i don't use "CachedUpdates" i don't get any Error but if i use "CachedUpdates" i get an #9729 error on PRIMARY? index ...(My Primary index as you can see is "RecordID" which i don't touch neither created(it's DBISAM's) by me so DBISAM must handle it property because it's the engine's internal or something etc, etc etc ?)

  with DB_Table do
  begin
    Append;
    FieldByName('ID').AsInteger := Random(2398897);
    FieldByName('Code').AsInteger := 1;
  end;

  with DDB_Telephones do
  begin
    BeginCachedUpdates;
    Append;
    FieldByName('Type_01').AsInteger := 1;
    FieldByName('Type_02').AsInteger := 1;
    FieldByName('Data').AsString := 'Test';
    Post;
    DB_Table.Post;
    ApplyCachedUpdates;
  end;

  Caption := '1/2';
  Application.ProcessMessages;

  with DB_Table do
  begin
    Append;
    FieldByName('ID').AsInteger := Random(2398897);
    FieldByName('Code').AsInteger := 1;
  end;

  with DDB_Telephones do
  begin
    BeginCachedUpdates;
    Append;
    FieldByName('Type_01').AsInteger := 1;
    FieldByName('Type_02').AsInteger := 1;
    FieldByName('Data').AsString := 'Test';
    Post;
    DB_Table.Post;
    ApplyCachedUpdates;
  end;

  Caption := '2/2';
  Application.ProcessMessages;



Resolution Resolution
Fixed Problem on 4/29/2005 in version 4.20 build 1


Products Affected Products Affected
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image