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

五迷三道 提交于 2019-12-10 20:32:08

问题


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.


回答1:


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]



来源:https://stackoverflow.com/questions/10912650/ora-00932-inconsistent-datatypes-expected-number-got-nclob-error-when-trying

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!