Board index » delphi » What is "BLOB has been modified"??

What is "BLOB has been modified"??

In Delphi 1.0/2.0, I'm accessing a TBlobField in a paradox-type TTable.  I
use TBlobStream object to get the data and it works fine 99.99% of the
time.

However, once in a while, I get an EDatabase exception that reports "BLOB
has been modified".  Sometimes it's repeatable, other times it is not.
This is driving me C*R*A*Z*Y!

A little background... I'm reading in a record structure (hence the need
for TBlobField, or is there a better way?) and one of the record's fields
is a strin.  Here's how I do it...

try
  Result := BlobStream1.Read( myString[0], sizeof(char))
       and BlobStream1.Read( myString[1], myString[0]);
except
  on E:EDatabaseError do .....
end;

There are additional fields in the structure beyond "myString", so I can't
simply use a TStringField.

Any idea on why I'm getting "BLOB has been modified"????

Thanks for reading this,

Steve

 

Re:What is "BLOB has been modified"??


I made a typo in me post... here's what my code sample shoul...

try

  isValidRead :=
     (BlobStream1.Read(myString[0],sizeof(char))=sizeof(char))
 and (BlobStream1.Read(myString[1],myString[0])=myString[0]);

except
  on E:EDatabaseError do ....

end;

Stephen L. Vinson (insi...@comet.connix.com) wrote:
: In Delphi 1.0/2.0, I'm accessing a TBlobField in a paradox-type TTable.  I
: use TBlobStream object to get the data and it works fine 99.99% of the
: time.

: However, once in a while, I get an EDatabase exception that reports "BLOB
: has been modified".  Sometimes it's repeatable, other times it is not.
: This is driving me C*R*A*Z*Y!

: A little background... I'm reading in a record structure (hence the need
: for TBlobField, or is there a better way?) and one of the record's fields
: is a strin.  Here's how I do it...

: try
:   Result := BlobStream1.Read( myString[0], sizeof(char))
:        and BlobStream1.Read( myString[1], myString[0]);
: except
:   on E:EDatabaseError do .....
: end;

: There are additional fields in the structure beyond "myString", so I can't
: simply use a TStringField.

: Any idea on why I'm getting "BLOB has been modified"????

: Thanks for reading this,

: Steve

Re:What is "BLOB has been modified"??


Quote
>: Any idea on why I'm getting "BLOB has been modified"????

Not much help, but the only time I've seen this is when the database
was partially corrupted (program crashes, db not properly closed.)

Re:What is "BLOB has been modified"??


Quote
>: Any idea on why I'm getting "BLOB has been modified"????

Not much help, but the only time I've seen this is when the database
was partially corrupted (program crashes, db not properly closed.)

Other Threads