Icon View Incident Report

Minor Minor
Reported By: Mauricio Yamamura
Reported On: 4/8/2005
For: Version 4.19 Build 1
# 2009 Using TDBISAMTable FieldDefs Add Method With AlterTable Causes Data Loss

When I use TDBISAMTable.AlterTable with TDBISAMTable.FieldDefs.Add, Ive got all data in table lost. If I use TDBISAMTable.FieldDefs.Update then no data is lost.

var
   IfIChangeThisTableDataWillBeLost : Boolean;
begin
   with DBISAMTable do
      begin
      FieldDefs.Add('Password', ftInteger, 0, True, '0');
      FieldDefs.Add('Name', ftString, 6, False);
      IfIChangeThisTableDataWillBeLost := True;
      if IfIChangeThisTableDataWillBeLost then
         FieldDefs.Add('ExtraField', ftInteger, 0, True, '5');
      AlterTable();
      end;
end;



Comments Comments and Workarounds
The workaround is to use the FieldDefs.Update method instead of manually populating existing fields and only add any new fields.


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


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

Image