问题
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