We've found a misterious happening while handling with BLOB-Fields under the
following conditions:
- BDE 3.51
- Delphi 3.0
- DBASE-Alias
Under certain circumstances the following error happens:
BLOB already open (BDE-Error)
This error happens, when I've tried to edit a BLOB-Field in the Mask, after
having initialised the whole mask by a lookup (getting standard-Values).
So I've searched for a solution and I've seen, that the Value
TBlobField.FModifiedRecord is not synchronised well with the Value
DataSet.ActiveRecord. This error provokes that the modified
BlobField does not keep the Property 'Modified' and when you create your
next TBlobStream
the System does not realize, that the Field is still modified and the BLOB
is already open. Like
this the System tries to Reopen the same BLOB (DbiOpenBlob) in the
Blob-Stream-Constructor
and provokes an Exception.
To surround this Exception I've simply modified the Modified-Property of the
TBlobField:
( DB.PAS, line 3418)
Old Version:
function TBlobField.GetModified: Boolean;
begin
Result := FModified and (FModifiedRecord = DataSet.ActiveRecord);
end;
New Version:
function TBlobField.GetModified: Boolean;
begin
Result := FModified; // and (FModifiedRecord =
DataSet.ActiveRecord);
end;
Like this this Exception does not happen anymore and the System is still
stable.
Maybe you've got a better solution. If you have a better Idea please give me
an answer.
--
Brian Bushay (TeamB)
Bbushay@NMPLS.com
               (
geocities.com/huanlin_tsai)