Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread EDB Error #601
Tue, Apr 29 2008 3:00 PMPermanent Link

"keith crusius"
I'm dealing with the following error:

ElevateDB Error #601 The temporary table DEVTEAM-KEITH12721168IGN588 is
corrupt (Invalid BLOB block type found)

I'm using 1.09 build 1, any ideas?
Tue, Apr 29 2008 3:29 PMPermanent Link

"keith crusius"
More info:
 The error occurs with a call to TEDBBlobstream.create(blobfield,bmRead);
 Tracing into the edbcomps unit the error occurs at line #10205:
FRowValue.LoadBlobStream;
Tue, Apr 29 2008 5:54 PMPermanent Link

"keith crusius"
When I replaced the EDBQuery with a EDBTable to retrieve the blob field the
error went away.

There seems to be a problem retrieving the blob field in a tempory table
created by a query.

So I had something like:
 edbquery -> 'select * from Messages where flag is NULL';
 loop through records
   tedbblobstream.create(query.fieldbyname('ablobfield') as
TBlobField,bmread);  //some 601 errors

But when using edbtable
 tedbblobstream.create(table.fieldbyname('ablobfield') as
TBlobField,bmread);  //no errors
Wed, Apr 30 2008 10:30 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< When I replaced the EDBQuery with a EDBTable to retrieve the blob field
the error went away.

There seems to be a problem retrieving the blob field in a tempory table
created by a query. >>

Could you send me the table that you're using for the query along with the
database catalog ?  I'm not seeing the error here with the BLOB columns that
I'm testing with.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 30 2008 11:01 AMPermanent Link

"keith crusius"
I sent requested info via your email address.  Let me know if you don't get
it.
Thanks
Wed, Apr 30 2008 2:49 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< I sent requested info via your email address.  Let me know if you don't
get it. >>

I got it fine, thanks.

Use D7, I ran this code using the IGNMessages table:

uses ZLib;

procedure TForm1.Button1Click(Sender: TObject);
begin
  with EDBTable1 do
     begin
     Open;
     First;
     while (not EOF) do
        begin
        zDecompressTextBlobEDB(EDBTable1CompressedRawMsg);
        Next;
        end;
     end;
  ShowMessage('Done');
end;

function TForm1.zDecompressTextBlobEDB(const AField: TBlobField): String;
var
 ss : TStringStream;
 bs : TEDBBlobStream;
 ds : TDecompressionStream;
 bufLen : Integer;
 buf : Array[0..65535] of Byte;
begin
 Result := '';
 if not AField.IsNull then begin
   ss := TStringStream.Create('');
   try
     bs := TEDBBlobStream.Create(AField,bmRead);  //error occurring here
     try
       ds := TDecompressionStream.Create(bs);
       try
         bufLen := ds.Read(buf,SizeOf(buf));
         while bufLen > 0 do begin
           ss.Write(buf,bufLen);
           bufLen := ds.Read(buf,SizeOf(buf));
         end;
       finally
         FreeAndNil(ds);
       end;
     finally
       FreeAndNil(bs);
     end;
     Result := ss.DataString;
   finally
     FreeAndNil(ss);
   end;
 end;
end;

And it works fine here with 1.09 B3.  Do you have any data-aware controls
connected to the BLOB field at all ?

Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 30 2008 3:16 PMPermanent Link

"keith crusius"
D2006 here.  No data aware controls.  Remember the error occurred when the
query created a tmp table.  Code snipit below:

           q1 := ignDMdata.TmpDataQuery; //this is just a tedbquery with
the session and database set
           try
             q1.sql.add('SELECT *');
             q1.sql.add('FROM ignMessages');
             q1.sal.add('WHERE ProcessedFlag is NULL');
             q1.Open;

             q1.First;
             while not q1.eof do begin
                   pk := q1.fieldbyname('pk').AsInteger;
                   sub:= q1.fieldbyname('date').AsString + '  ' +
q1.FieldByName('Subject').AsString;

                   OldError :=
boolean(q1.FieldByName('processedflag').AsString = 'E');
                   if OldError then lb3.Caption :=
inttostr(strtoint(lb3.Caption)+1);

                   global.ProcessErrors.Error := false;

                   info := TMessageInfo.Create(
                     q1.FieldByName('MessageGUID').AsString,
                     q1.FieldByName('Subject').AsString,
                     q1.FieldByName('JurisCode').AsString,
                     q1.FieldByName('EMailAddress').AsString,
                     q1.FieldByName('Date').AsDateTime
                   );
                   try
                     //next line got me the 601 errors
                     rawmsg :=
igndmdatafunctions.zDecompressTextBlobEDB(q1.FieldByName('CompressedRawMsg')
as TBlobField);

Thu, May 1 2008 7:21 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< Remember the error occurred when the query created a tmp table.  Code
snipit below: >>

Sorry, my mistake.  I tried it also with a query and this SQL:

SELECT * FROM ignMessages WHERE ProcessedFlag is NULL

And it still seems to work just fine.  I've got Requestsensitive=False, so
it's definitely generating a temporary table for the result set.

Are you accessing the CompressedRawMsg field in any other location *after*
the query has been opened (like perhaps the TMessageInfo.Create constructor)
?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, May 2 2008 2:25 PMPermanent Link

"keith crusius"
No I'm not accessing that field anywhere else.  I installed build 3 with
same results.  The only info I haven't given you is that I'm running from
the server on a vista machine if it matters.  My work around using an
edbtable to get the blob field is working fine.  If I come across anything
else I'll let you know.  Thanks.
Mon, May 5 2008 11:45 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< No I'm not accessing that field anywhere else.  I installed build 3 with
same results.  The only info I haven't given you is that I'm running from
the server on a vista machine if it matters.  My work around using an
edbtable to get the blob field is working fine.  If I come across anything
else I'll let you know.  Thanks.  >>

Vista shouldn't make any difference, but it could be an issue with the
temporary tables folder setting.  Also, what about anti-virus software ?
Anything installed on your machine ?  EDB should be immune from the issues
that DBISAM had with AV software, but you never know - they keep coming up
with ways to screw around with our temporary tables.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image