Stream read error when obtaining a BLOB

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
scarecrow
Posts: 8
Joined: Wed 16 Aug 2006 04:37

Stream read error when obtaining a BLOB

Post by scarecrow » Wed 16 Aug 2006 04:48

ODAC 5.70.1.34, Delphi 7 (Build 8.1), Oracle 9.2.0.6

We cannot get a blob field value due to the following error:

Code: Select all

Exception Class:   "EReadError"
Exception Message: "Stream read error"
The field is accessed as following:

Code: Select all

Query.SQL.Text := 'select file_content from files where id=:1';
...
sContent := Field.AsString;
ODAC 5.55.1.24 worked ok.

Please help us A.S.A.P. as we are being urged to upgrade...

scarecrow
Posts: 8
Joined: Wed 16 Aug 2006 04:37

Post by scarecrow » Wed 16 Aug 2006 05:46

I also tried to use (Field as TBlobField).SaveToFile(), but error remains the same.

scarecrow
Posts: 8
Joined: Wed 16 Aug 2006 04:37

Post by scarecrow » Wed 16 Aug 2006 06:13

We have found the error cause. It's TOraSession.Options.ConvertEOL. When it's True looks like it tries to convert BLOB field content which is definitely an erroneous behavior.

ODAC 5.55 was handling it correctly.

It's very important for us to upgrade, but we cannot turn off ConvertEOL. When can we expect this bug be fixed?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Aug 2006 09:05

We have fixed this problem. The fix will be included in next build of ODAC.

nschmied
Posts: 72
Joined: Mon 09 May 2005 08:03
Location: Suisse

Post by nschmied » Wed 23 Aug 2006 15:11

And similary issuse if you use ConvertEOL and IsUnicode=True, with Clob.

Because ReadClob convert EOL and add some byte and after the length doesn't egal to count. And Borland TStream raise a error.

Thank,
NSC

Post Reply