" ORA-00932:不一致的数据类型:预期数量得到NCLOB"尝试使用实体框架,以节省大量的XML时出错 [英] "ORA-00932: inconsistent datatypes: expected NUMBER got NCLOB" error when trying to save large xml using the Entity Framework
问题描述
我收到以下错误,当我尝试插入与大型XML与使用ADO.NET实体框架XMLType列Oracle表新记录。
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.
然而,当我尝试插入一个小型的XML它保存它没有任何问题。
However when I try to insert a small xml it saves it without any problem.
推荐答案
在他们指出,有一个2000个字符的限制目前正与保存到XML数据类型的Oracle ODAC文档。
On the Oracle ODAC documentation they note that there's a 2000 character limit currently with saving to the XML data type.
这是ORA-00932:不一致的数据类型:预期 - 有NCLOB,试图为一个字符串,等于绑定时错误
会遇到或
长度超过2000个字符XMLType列或
参数。 [错误12630958]
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]
这篇关于" ORA-00932:不一致的数据类型:预期数量得到NCLOB"尝试使用实体框架,以节省大量的XML时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!