When I try save more than 2000 chars into clob/nclob
ORA-01461: can bind a LONG value only for insert into a LONG column
error is occured.
using (ITransaction transaction = session.BeginTransaction())
{
TestTableTypes
TestTableTypes;
string
//tmpString = new string('я', 0x0ffff);
//tmpString = new string('я', 2000);
//tmpString = new string('я', 2001);
#if !TEST_CLOB_BY_OBJECT
TestTableTypes = new TestTableTypes();
TestTableTypes.Id = 1;
TestTableTypes.FClob = tmpString;
TestTableTypes.FNClob = tmpString;
session.SaveOrUpdate(TestTableTypes);
#else
query = session.CreateQuery("FROM TestTableTypes WHERE Id = 1");
TestTableTypes = query.List<TestTableTypes>()[0];
TestTableTypes.FClob = tmpString;
TestTableTypes.FNClob = tmpString;
#endif
transaction.Commit();
}
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-
import="true">
<class name="AnyTestOracleCastle.TestTableTypes,
AnyTestOracleCastle" lazy="true">
<id name="Id">
<generator class="native" />
</id>
<property name="FVarchar2" />
<property name="FNVarchar2" />
<property name="FClob" />
<property name="FNClob" column="FNClob" type="StringClob" not-
null="false" />
</class>
</hibernate-mapping>
But tmpString = new string('я', 0x0ffff) is saved without error.
P.S.
http://www.google.com/#&q=ora-01461+can+bind+a+long+value+only+for+insert+into+a+long+column+clob