Page 1 of 1
LOB stream read error in version 6
Posted: Thu 05 Apr 2007 12:28
by MarkF
Hi Folks!
I'm getting a 'stream read error' if I try to read a CLOB field with Options.CacheLobs := False; I'm using Oracle 10g and the database character set is utf8 (if that helps.)
I noticed that version 6 doesn't have the fix for reporting RowsProcessed even if an error occurs (just a reminder for the next release!)
Thanks!
-Mark
Posted: Thu 05 Apr 2007 14:13
by Plash
Please specify the NLS_LANG value on the client computer. Also specify the values for the Charset, UseUnicode, Direct options of the TOraSession component.
In ODAC 6.00.0.4 we have added ability to get RowsProcessed when an exception is raised for a row. We could not reproduce the problem with RowsProcessed. Please check that your ODAC version is 6.00.0.4. Specify Oracle database and client versions that you use to test the RowsProcessed property. Also provide your Pascal code.
Posted: Thu 05 Apr 2007 14:40
by MarkF
That's interesting! I built my bpls from the source, so perhaps I made a mistake. I checked the source code and the rowsprocessed change wasn't there. Could there be a discrepancy between the source and pre-built version? I'm about to install the full non-source version to test. If it helps my info is:
Charset is UTF8
Use unicode is false (I'm only using ansi chars.)
Not using direct option.
Code is a standard query returning a clob and reading it .asstring with CacheLobs = false. Perhaps this is a source code issue or some mistake I've made, so I'll test and get back to you. Thanks for your help!
-Mark
Posted: Fri 06 Apr 2007 12:10
by MarkF
On the rowsprocessed issue:
Using the pre-built bpls fixes the rowsprocessed issue. I reinstalled the source code and the changes do appear so I must have made a mistake on the original install. Sorry for the incorrect report!
On the stream read error:
I get the stream read error if my NLS_LANG is
AMERICAN_AMERICA.UTF8
If I switch back to AMERICAN_AMERICA.WE8MSWIN1252 then I don't get the error.
The code I'm using is:
OQuery := TSmartQuery.Create(nil);
OQuery.Session := OSession;
OQuery.Options.DeferredLobRead := True;
OQuery.Options.CacheLobs := False;
OQuery.SQL.Text := '*select single clob column*';
OQuery.Execute();
if not OQuery.Eof then
ShowMessage(OQuery.Fields[0].AsString);
If I change to OQuery.Options.CacheLobs := True; then I don't get the error and the clob is read properly.
Thanks,
-Mark
Posted: Tue 10 Apr 2007 06:33
by Plash
We have fixed the problem with using the UTF-8 character set. The fix will be included in the next build of ODAC.