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 ?
Error With CLOB on ORACLE9i
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 7
- Joined: 19.09.2006, 16:04
- Location: Rio do Sul, SC
-
- Fresh Boarder
- Posts: 7
- Joined: 19.09.2006, 16:04
- Location: Rio do Sul, SC
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.
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.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
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
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
http://zeos.firmos.at/viewtopic.php?t=850
Mark