Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ORA-00932: inconsistent datatypes: expected NUMBER got NCLOB" error when trying to save large xml using the Entity Framework

I get the following error when I try to insert new record with large xml into the oracle table with XmlType column using ADO.NET Entity Framework.

Oracle.DataAccess.Client.OracleException
            Message=ORA-06550: line 5, column 22:
PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got NCLOB
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored

The data type of the property mapped to this column is string.

However when I try to insert a small xml it saves it without any problem.

like image 622
surajnaik Avatar asked Nov 18 '25 03:11

surajnaik


1 Answers

On the Oracle ODAC documentation they note that there's a 2000 character limit currently with saving to the XML data type.

An "ORA-00932: inconsistent datatypes: expected - got NCLOB" error will be encountered when trying to bind a string that is equal to or greater than 2,000 characters in length to an XMLType column or parameter. [Bug 12630958]

like image 98
Prethen Avatar answered Nov 19 '25 17:11

Prethen