Error With CLOB on ORACLE9i

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
clebernardelli
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 19.09.2006, 16:04
Location: Rio do Sul, SC

Error With CLOB on ORACLE9i

Post 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 ?
pol
Senior Boarder
Senior Boarder
Posts: 91
Joined: 13.10.2005, 08:19

Post 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.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Check the DLLs, could be a version problem?
clebernardelli
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 19.09.2006, 16:04
Location: Rio do Sul, SC

Post 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.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Post Reply