http://www.devart.com/forums/viewtopic. ... c650c2a60a
I have dotConnect for Oracle version 5.70.180.0. I have an Oracle table column of NVARCHAR2(2000). However, I cannot insert more than 666 characters into the column. I tested with the same example from the post above, but it failed to work in my environment.
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();
Devart.Data.dll 5.0.134.0
Devart.Data.Oracle.dll 5.70.180.0
Could it be a devart library issue? Or is it caused by something else? My guess is that the library assumes Unicode character is 3 bytes per character, so it only takes up to 666 at the end, and it fails when string length is 667 or longer.
Thanks,
David