Having problems inserting arrays using transactions...can someone help? I know I&#039;m missing something really simple. Thanks<BR><BR>Here&#039;s the code:<BR><BR>using System;<BR>using System.Data;<BR>using System.Data.OracleClient;<BR><BR>namespace TransOracle<BR>{<BR> class TransOracle<BR> {<BR> public static void Main(string[] args)<BR> {<BR> // initialize array data<BR> int[] aDeptNum = new int[] {11,29,41};<BR> string[] aDeptName = new string[] {"Development","Public Relations","Shipping & Receiving"};<BR><BR> string connectionString = "Data Source=ora_db;User ID=usr;Password=passwd;";<BR> <BR> // Create objects and open database connection<BR> OracleConnection cnn = new OracleConnection(connectionString);<BR> cnn.Open();<BR> //OracleCommand cmd = cnn.CreateCommand();<BR> OracleCommand cmd = new OracleCommand("",cnn);<BR> OracleTransaction trans;<BR> <BR> // Start a local transaction<BR> trans = cnn.BeginTransaction();<BR> <BR> // assign trans object for a pending local transaction<BR> cmd.Transaction = trans;<BR> long rows = 0;<BR> // Put transaction commands in a try ... catch block<BR> try<BR> {<BR> // INSERT INTO test Table <BR> <BR> cmd.CommandText = "INSERT INTO test VALUES(" + aDeptNum + ",&#039;" + aDeptName + "&#039;)";<BR> cmd.CommandType = CommandType.Text;<BR> rows += cmd.ExecuteNonQuery();<BR> <BR> // Commit the transaction ....<BR> trans.Commit();<BR> Console.WriteLine("Commit complete, {0} ", rows + " Rows updated");<BR> }<BR><BR> // ... or Rollback everything in case of an error<BR> catch(Exception e)<BR> {<BR> trans.Rollback();<BR> Console.WriteLine("Transaction failed - Rolled Back!

");<BR> Console.WriteLine(e.Message);<BR> } <BR> finally<BR> {<BR> cnn.Dispose();<BR> cmd.Dispose();<BR> }<BR> }<BR> }<BR>}