Icon View Incident Report

Serious Serious
Reported By: Max Terentiev
Reported On: 8/25/2009
For: Version 4.28 Build 5
# 3039 Inserting and Deleting Records with BLOB Fields Can Cause #8963 BLOB Buffers Corrupt Error

After installing DBIsam 4.28 build 5 i notice many

"8963 BLOB block buffers corrupt" errors after trivial append/delete on some tables contains many blob fields.

I use folowing code to add/delete records to it.

procedure TMainForm.AddMessageActionExecute(Sender: TObject);
var F : TEditMessageNameForm;
CurID:Integer;
begin
 DM.MessagesTable.Refresh;
 CurID:=DM.MessagesTable.FieldByName('ID').AsInteger;
 F := TEditMessageNameForm.Create(Self);
 try
  F.ShowModal;
  if F.ModalResult = mrOk then
   begin
    MessagesTree.BeginUpdate;
    DM.MessagesTable.Append;
    DM.MessagesTable.FieldByName('Parent_ID').AsInteger:=CurID;
    DM.MessagesTable.FieldByName('Name').AsString := F.NameEdit.Text;
    DM.MessagesTable.Post;
    DM.MessagesTable.FlushBuffers;
    MessagesTree.EndUpdate;
   end;
 finally
  F.Free;
 end;
end;

procedure TMainForm.DeleteMessageActionExecute(Sender: TObject);
var
CurParentID:Integer;
CurID:Integer;
DelQuery:String;
begin
 CurParentID:=DM.MessagesTable.FieldByName('Parent_ID').AsInteger;
 CurID:=DM.MessagesTable.FieldByName('ID').AsInteger;
 DM.MessagesTable.FlushBuffers;
 if Application.MessageBox('Delete selected message ?',PChar(Application.Title),
MB_YESNO OR MB_ICONQUESTION) = IDYES then
        begin
        DelQUery:='DELETE FROM "Messages" WHERE ID='+IntToStr(CurID)+';';
        DelQUery:=DelQuery+'UPDATE "Messages" SET 
Parent_ID='+IntToStr(CurParentID)+' WHERE Parent_ID='+IntToStr(CurID)+';';
        DM.OpenQuery(DelQuery,'WorkBase',false);
        DM.MessagesTable.Refresh;
        DM.MessagesTable.Locate('ID',CurParentID,[]);
        end;
end;

procedure TDM.OpenQuery(SQL : string; DBName: String; RequestLive : 
Boolean);
begin
 TempQuery.Active := false;
 TempQuery.RequestLive := RequestLive;
 TempQuery.SQL.Clear;
 if DBName='WorkBase' then
        begin
        TempQuery.SessionName:='Work_Session';
        TempQuery.DatabaseName:='Work_Base';
        end
 else if DBName='ListBase' then
        begin
        TempQuery.SessionName:='List_Session';
        TempQuery.DatabaseName:='List_Base';
        end;
 TempQuery.SQL.Add(SQL);
 TempQuery.ExecSQL;
end;



Comments Comments
The problem would occur during a subsequent access to the BLOB field, and was caused by the re-use of the records not setting the BLOB signatures properly (see incident #3038). If you have a table that has experienced this problem, please contact us for information on how to repair the table.


Resolution Resolution
Fixed Problem on 8/26/2009 in version 4.28 build 6


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM ODBC Trial
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image