ORA-00932: inconsistent datatypes: expected - got CLOB

ORA-00932: inconsistent datatypes: expected - got CLOB

Postby creaseypaul » Mon 03 Sep 2012 15:16

I have a column of type CLOB NULL.

When i try to update a single value on that record:

Code: Select all
var lastVersion = _db.MyTable.Where(x => x.ID == model.ID && x.VERSION == model.VERSION -1).Single();
lastVersion.IS_CURRENT_VERSION = "N";
_db.SubmitChanges();


The following is generated:

Code: Select all
UPDATE MY_SCHEMA.MY_TABLE
SET IS_CURRENT_VERSION = :p1
WHERE ID = :key1
AND VERSION = :key2
AND ((:nullchk1 = 1 AND CREATED IS NULL) OR (CREATED = :chk1)) AND
((:nullchk3 = 1 AND CLOB_COLUMN IS NULL) OR (CLOB_COLUMN = :chk3))
-- p1: Input Char (Size = 1; DbType = String) [N]
-- key1: Input Number (Size = 0; DbType = Decimal) [1546]
-- key2: Input Number (Size = 0; DbType = Decimal) [1]
-- chk1: Input Date (Size = 0; DbType = DateTime) [03/09/2012 13:16:00]
-- nullchk1: Input Integer (Size = 0; DbType = Int32) [0]
-- chk2: Input Number (Size = 0; DbType = Decimal) [3]
-- nullchk2: Input Integer (Size = 0; DbType = Int32) [0]
-- chk3: Input Clob (Size = 0; DbType = String) []
-- nullchk3: Input Integer (Size = 0; DbType = Int32) [1]
-- Context: Devart.Data.Oracle.Linq.Provider.OracleDataProvider Model: MetaModel Build: 4.0.21.0


It appears that the check on the clob columm (CLOB_COLUMN = :chk3 is causing:

Code: Select all
ORA-00932: inconsistent datatypes: expected - got CLOB


Oracle 10g (10.2.0.5)
Devart.Data.Linq 4.0.21.0
creaseypaul
 
Posts: 11
Joined: Mon 14 Feb 2011 15:56

Re: ORA-00932: inconsistent datatypes: expected - got CLOB

Postby creaseypaul » Mon 03 Sep 2012 15:34

I figure out how to get around it, somehow the UpdateCheck attribute was set, which it shouldn't be, but the immediate issue is resolved.

Although use of updatecheck on a clob would be frowned upon! The correct usage is clearly:

Code: Select all
TO_CHAR(CLOB_COLUMN) = :chk3
creaseypaul
 
Posts: 11
Joined: Mon 14 Feb 2011 15:56

Re: ORA-00932: inconsistent datatypes: expected - got CLOB

Postby MariiaI » Wed 05 Sep 2012 07:42

Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ORA-00932: inconsistent datatypes: expected - got CLOB

Postby MariiaI » Wed 19 Sep 2012 12:53

We have fixed the bug related to the CLOB types. This fix will be available in the new build of LinqConnect. We plan to release it in a week.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ORA-00932: inconsistent datatypes: expected - got CLOB

Postby MariiaI » Fri 05 Oct 2012 06:02

New build of LinqConnect 4.1.101 is available for download now!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=25023
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)