Icon View Incident Report

Serious Serious
Reported By: Rob Rietow
Reported On: 12/7/2000
For: Version 2.05 Build 1
# 679 Modifying RestructureFieldDefs and then Calling RestructureTable Does Not Work

The following worked in 2.03 but does not work in 2.05. It runs through the code with no errors, but does not add the fields from the table.

TableToCreate:=TDBISAMTable.Create(Application);
try
   try
    with TableToCreate do
      begin
      DatabaseName:=dbpath;
      tabletocreate.TableName:= 'events';
      active := false;
      Exclusive:=True;
      restructureFieldDefs.update;
      restructureFieldDefs.add('GOTNOTES',ftBoolean,0,False,'false','','',
'',
                               fcNoChange,restructureFieldDefs.count+1);
      restructureFieldDefs.add('MASTERCONFIRMNO',ftFloat,0,False,'','','',
'',
                               fcNoChange,restructureFieldDefs.count+1);
      restructureIndexDefs.update;
      RestructureTable(0,0,1,0,False,'','',512,-1,True);
      end;
  except
    result := false;
    showmessage('Version 1.36 Error adding GETNOTES AND MASTERCONFIRMNO '+
                'to sysbojs');
    exit;
  end;
finally
  tabletocreate.free;
end;




Comments Comments and Workarounds
The RestructureIndexDefs' Update method was re-setting the RestructureFieldDefs. The workaround to this is to call RestructureIndexDefs.Update *first* before updating and modifying the RestructureFieldDefs objects.


Resolution Resolution
Fixed Problem on 12/8/2000 in version 2.06 build 1
Image