Posted: Mon 29 May 2006 09:19
You can use String type of array of char as a value for OracleDbType.Clob parameter. For more information please read "Working with BLOB and CLOB Data" article of OraDirect .NET help documentation.
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
this.oracleCommand2.CommandText = "INSERT INTO ODAC_CLOB\n (CODE, VALUE)\nVALUES\n (:CODE, :VALUE)\n";
this.oracleCommand2.Parameters.Add(new CoreLab.Oracle.OracleParameter("CODE", CoreLab.Oracle.OracleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
this.oracleCommand2.Parameters.Add(new CoreLab.Oracle.OracleParameter("VALUE", CoreLab.Oracle.OracleDbType.Clob, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
oracleConnection1.Open();
((OracleParameter)oracleCommand2.Parameters[0]).ArrayLength = 3;
((OracleParameter)oracleCommand2.Parameters[0]).Value = new int[3]{21,22,23};
((OracleParameter)oracleCommand2.Parameters[1]).ArrayLength = 3;
((OracleParameter)oracleCommand2.Parameters[1]).Value = new string[3]{"21","22","23"};
oracleCommand2.ExecuteArray(3);