We use for import of data array binding. Is there any faster method?
Simplified code - only one column:
Code: Select all
void Import(IDbConnection connection, object[] data)
{
OracleParameter parameter = new OracleParameter();
parameter.Value = data;
parameter.ArrayLength = data.Length;
string commandText = "INSERT INTO TBL (COL) VALUES (:BIND0)";
using (IDbCommand command = connection.CreateCommand())
{
command.CommandText = commandText;
command.Parameters.Add(parameter);
command.ExecuteArray(data.Length);
}
}
Petr.