Icon View Incident Report

Serious Serious
Reported By: Scott Martin
Reported On: 11/25/2003
For: Version 4.00 Build 1
# 1495 Calling DeleteAllIndexes and Then AddIndex Results in an 8965 Index Page Buffers Corrupt Error

I get an error of 8965: Index Page Buffers are corrupt with the following code.

procedure TForm1.Button1Click(Sender: TObject);
begin
      with CNotesDBI do begin
         try
            Close;
            // setup table
            DisableControls;
            DatabaseName := 'D:\FF\PracticeMgr\Data\';
            TableName := 'RECURDEF.DAT';
            // upgrade DBISAM version if needed
            if VersionNum < EngineVersion then
              UpgradeTable;
            Exclusive := True;
            Open;
            First;
            // create tags
            DeleteAllIndexes;
            if FindField('RecurrenceID') <> nil then
               AddIndex('RecurrenceID','RecurrenceID', [],'',icNone);
            if FindField('EventID')      <> nil then
               AddIndex('EventID','EventID', [],'',icNone);
            Close;
            // optimize table
            OptimizeTable('',False); //////// ERROR 8965,
                                     Index page buffers corrupt
            EnableControls;
            ShowMessage('OK');
         except
            on E: Exception do begin
               if (E is EDBISAMEngineError) then begin
                  MessageDlg(E.Message, mtError, [mbOK], 0);
                  Exit;
               end
               else
                  Raise;
                  Exit;
               end;
         end;
      end;
end;



Resolution Resolution
Fixed Problem on 12/8/2003 in version 4.01 build 1
Image