Strange exception in Array binding mode.
Posted: Wed 05 Jul 2006 14:21
I found exception when I made some changes in example "OraDirect .NET demo - using array bind operations" that I'd got with trial version of OraDirect components. Our Oracle database works with UTF-8 dataset so I changed OraConnection parameter Unicode to true. During execution insert to the demo table DEPT:
oraUpdateCommand.Parameters["deptno_p"].Value = deptnoArr;
oraUpdateCommand.Parameters["dname_p"].Value = dnameArr;
oraUpdateCommand.ExecuteArray(recCount);
where oraCommand.Text = INSERT INTO DEPT ( DEPTNO, DNAME)
VALUES ( :deptno_p, :dname_p)
I 'd recieve an exception with message "ORA-01461: can bind a LONG value only for insert into a LONG column".
When OraConnection.Unicode = false - everything works fine.
When OraConnection.Unicode = false but i am inserting only 1 row with
oraUpdateCommand.ExecuteNonQuery everything work.
So, what is my problem?
Best, regards Leonid.
oraUpdateCommand.Parameters["deptno_p"].Value = deptnoArr;
oraUpdateCommand.Parameters["dname_p"].Value = dnameArr;
oraUpdateCommand.ExecuteArray(recCount);
where oraCommand.Text = INSERT INTO DEPT ( DEPTNO, DNAME)
VALUES ( :deptno_p, :dname_p)
I 'd recieve an exception with message "ORA-01461: can bind a LONG value only for insert into a LONG column".
When OraConnection.Unicode = false - everything works fine.
When OraConnection.Unicode = false but i am inserting only 1 row with
oraUpdateCommand.ExecuteNonQuery everything work.
So, what is my problem?
Best, regards Leonid.