title: ThreadAbortException on a console app on multiple database inserts
body: <p>If I try to execute >100 database inserts one at a time using a thread in a console app, I get following error. As per the current architecture I need to insert records one at a time. For lesser number of records(10-30),the error doesn't happen. Is inserting so many records one at a time creating this issue?</p>
  
  <p>The code is something like:</p>
  
  <pre><code>foreach (MyObject myObject in myObjectCollection)
  {
     var database = new SqlDatabase(connectionString);
     using (DbCommand command = database.GetStoredProcCommand(storedProcedureName))
     { 
           // Create parameters from myObject
           // Add parameters to the command object         
           database.ExecuteNonQuery (command);
     }    
  
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>System.Threading.ThreadAbortException: Thread was being aborted.    
   at SNIReadSync(SNI_Conn* , SNI_Packet** , Int32 )    
   at SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr&amp; packet, Int32 timeout)    
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)    
   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()    
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()    
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()    
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)    
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)    
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)    
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)    
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()    
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DbCommand command)    
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command)
  </code></pre>