示例#1
0
        protected void ImportCurrentRow(int rowId, System.Data.Common.DbConnection connection)
        {
            try {
                User.BeginTransaction(connection);

                ImportRowImpl(rowId, connection);

                // If we get here we can commit the transacton....
                User.CommitTransaction();

                _successCount++;
            } catch (Exception ex) {
                Error("Error on Row {0}: {1}", rowId, ex.Message);
                // Roll back the transaction....
                User.RollbackTransaction();
                //  Mark the import row as failed
                RowSource.CopyToErrorTable(ex.Message);
                _errorCount++;
            }
        }