Icon View Incident Report

Minor Minor
Reported By: Bill Sparrow
Reported On: 5/25/2006
For: Version 4.24 Build 1
# 2201 Calling Post on Master DataSet from AfterPost Event Handler of Detail DataSet Causes Corruption

Taking a certain action in my app somehow creates a duplicate of the current record. It would appear that this record is a duplicate in every way, right down to the auto-incrementing ID field, and presumably to the contents of blob offsets in the blob fields. I then use DBSys to delete one of the duplicate records, and this corrupts the table. On accessing the original record, I get and error # 8963 BLOB block buffers corrupt in the table 'Assignment'. If I then repair the table, the contents of all the blob fields in the record are gone. Presumably, deleting the second record wiped out the blobs that the first record was referring to.

As for the "certain action" in my app that starts this sorry chain of events... The VCL for the DBNavigator, when handling a click on the Post button, appear to make a nested call to an OnExit handler of mine which also contains a Post call.


Comments Comments and Workarounds
What was happening was Bill was calling the master table's Post method while it is in the middle of a Post already. The
sequence went like this:

Master.Edit;
Detail.Edit;
Master.Post ----> Detail.CheckBrowseMode ---> Detail.Post ---> Master.Post <<<< This is a problem

By the time DBISAM got to the second Master.Post, the master table was no longer in dsEdit mode, so DBISAM ended up appending the same record with the same BLOB offsets, etc.

There is now a check in DBISAM to prevent this, but the workaround was to simply "not do that".


Resolution Resolution
Fixed Problem on 5/30/2006 in version 4.25 build 1


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

Image