Icon View Incident Report

Serious Serious
Reported By: Bernd Kuhlmann
Reported On: 3/5/2006
For: Version 4.22 Build 6
# 2173 Updating BLOB Fields During an Edit Can Cause Record Contents to Revert Back to Original Values

Our customers have reported that changes to a record are not always saved but that they seem to be canceled.

To reproduce the problem the following steps are needed:
- start three instances of then program dbisamtest2.exe.
- press "Empty" to delete all records from the table vorgang
- press "Filltable" to create the test data
- in each instance select 1, 2 or 3 in the programm radiogroup
- press "Start test" in each instance

sooner or later the memo shows the lines
error wrong field value
error record not saved
This does not always happen, sometimes several runs are necessary.

The program is essentially calling the following procedure in a while loop. The problem is that changes to the field status (and other fields) are not always saved but the changes seem to be canceled.

TXT_Oben is a memofield and the problem does not occur without accessing this field.

procedure TForm1.DoVorgangLfs(id: Integer);
var tb: Tdbisamtable;
   s: String;
begin
 tb:=TdbisamTable.Create(nil);
 tb.tablename:='vorgang';
 tb.open;
 if tb.FindKey([id]) then
 begin
   tb.edit;
   tb.FieldByName('Status').asString:='L';
   tb.FieldByName('Status_Liefer_Nr').asInteger:=200;

   s:=tb.FieldByName('TXT_Oben').asstring;

   if tb.FieldByName('Status').asString<>'L' then
   begin
     // this should never happen
     memo1.lines.add('error wrong field value:'+
tb.FieldByName('Status').asString+
' vid: '+inttostr(id));
   end;
   tb.post;
   if tb.FieldByName('Status').asString<>'L' then
   begin
     // this should never happen
     memo1.lines.add('error record not saved:'+
tb.FieldByName('Status').asString+
' vid: '+inttostr(id));
   end;
 end else begin
   memo1.lines.add('vorgang not found:'+inttostr(id));
 end;
 tb.close;
 tb.free;
end;



Comments Comments
The problem was caused by the automatic record refresh kicking in when the BLOB open detected that there had been changes to the table since the last read.


Resolution Resolution
Fixed Problem on 3/20/2006 in version 4.23 build 1


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 VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image