Page 1 of 1
Error With CLOB on ORACLE9i
Posted: 04.10.2006, 19:22
by clebernardelli
When I have a field type CLOB in the Oracle, when opening the DataSet happens an error ORA-00932: inconsistent datatypes
Somebody already passed for this error ?
Posted: 05.10.2006, 11:54
by pol
Happens to me too: ORA-00932 - BINARY expected - got BLOB (in my case it is BLOB not CLOB), which is strange, it is a BLOB and it should expect a BLOB. ZSQLMonitor didn't show anything suspicious. Maybe it is because the client is 10g and the database 8i. I didn't investigate it further up to now.
Posted: 05.10.2006, 12:21
by zippo
Check the DLLs, could be a version problem?
Posted: 05.10.2006, 12:31
by clebernardelli
Thank you, pol.
I found the source of this problem. In unit ZDbcOracleResultSet.pas, the Open procedure:
unit ZDbcOracleResultSet.pas
procedure TZOracleResultSet.Open;
.
.
case CurrentVar.DataType of
.
.
(Before)
SQLT_CLOB:
(Only)
CurrentVar.ColType := stAsciiStream;
(After)
SQLT_CLOB:
begin
CurrentVar.ColType := stAsciiStream;
CurrentVar.TypeCode := CurrentVar.DataType;
end;
(When CurrentVar.DataType is 112, CurrentVar.TypeCode is 0)
InitializeOracleVar(FPlainDriver, Connection, CurrentVar,
CurrentVar.ColType, CurrentVar.TypeCode, CurrentVar.DataSize);
Perhaps it is not the best form to decide the problem, but thus it functioned.
Thanks.
Posted: 05.10.2006, 13:46
by mdaems
Hi clebernardelli,
Maybe you can have a look in the InitializeOracleVar function of ZDbcOracleUtils. There is some strange handling for stAsciiStream and stBinaryStream I don't understand, but maybe you can fix it there?
Please, let me know. I don't like the patch above, but when you don't find an other solution we can use it, hoping it doesn't break something else.
Mark
Posted: 24.10.2006, 22:08
by mdaems
Have a look at this topic. Problem seems similar, so I'll fix it this way. Keep an eye on it and please test as soon as it comes available in our version.
http://zeos.firmos.at/viewtopic.php?t=850
Mark