Reputation: 85
For my .NET project i really need to be able to insert an array of Clob's into an Oracle Db, using the Oracle.ManagedDataAccess lib.
byte[] newval = System.Text.Encoding.Unicode.GetBytes("Testyy");
var clob = new OracleClob(connection);
var clobList = new List<OracleClob>() { clob, clob };
clob.Write(newval, 0, newval.Length);
var longText = new OracleParameter
{
ParameterName = "p_tc_long_text",
OracleDbType = OracleDbType.Clob,
CollectionType = OracleCollectionType.PLSQLAssociativeArray,
Value = clobList.ToArray(),
Size = clobList.Count,
};
command.Parameters.Add(longText);
After execution of the command i get the Oracle Error:
ORA-03120: two-task conversion routine: integer overflow.
Upvotes: 2
Views: 860
Reputation: 1
Change the OracleDbType.Clob to OracleDbType.NClob. Its work to me!
Upvotes: 0
Reputation: 85
It's not supported
ODP.NET supports binding parameters of PL/SQL Associative Arrays which contain the following data types.
Upvotes: 0