protected override void DoExecuteBatch(IDbCommand ps) { CheckReaders(); ProfiledPrepare(_currentBatch.BatchCommand); if (Factory.Settings.SqlStatementLogger.IsDebugEnabled) { Factory.Settings.SqlStatementLogger.LogBatchCommand(_currentBatchCommandsLog.ToString()); _currentBatchCommandsLog = new StringBuilder().AppendLine("Batch commands:"); } int rowsAffected; try { rowsAffected = _currentBatch.ExecuteNonQuery(); } catch (DbException e) { throw ADOExceptionHelper.Convert(Factory.SQLExceptionConverter, e, "could not execute batch command."); } Expectations.VerifyOutcomeBatched(_totalExpectedRowsAffected, rowsAffected); _currentBatch.Dispose(); _totalExpectedRowsAffected = 0; _currentBatch = createConfiguredBatch(); }