using directmode=true, trying to insert into a nvarchar2(2000) column generates this error when the text string length is 900 which should work since the column length is 2000, when the string length is 500 it works. If I dont use direct mode =true then everything seems to work ok. is there some other limitation of direct mode that would cause this to happen? Note since we are also using mono we have to use directmode=true.
thanks
scott
ORA-01461: can bind a LONG value only for insert into a LONG
I have tried the following code with the 5.70.180 version of dotConnect for Oracle. It works.
Please try the 5.70.180 version and notify us about the results.
Code: Select all
// CREATE TABLE TESTNVARCHAR (
// NVARCHARCOLUMN NVARCHAR2(2000))
using (OracleConnection conn = new OracleConnection()) {
conn.ConnectionString = "Direct=true;server=db;port=1525;SID=***;uid=***;pwd=***;";
conn.Open();
OracleCommand command = conn.CreateCommand();
command.CommandText = "insert into testnvarchar(NVARCHARCOLUMN) values (:p1)";
command.Parameters.Add("p1", OracleDbType.NVarChar, 2000, "NVARCHARCOLUMN").Value = new string('a', 2000);
command.ExecuteNonQuery();
}