Exception ThreadAbortException Oracle and Asp.net

0

I have a function that will get a generic sql to do an operation on the database, after sending the command, I have in the log is information "ThreadAbortException", does anyone know how to work around this problem?

 public static bool ExecutaComandoGenerico(string strQuery)
        {
            var connectionString = GetConnectionString();
            using (OracleConnection connection = new OracleConnection(connectionString))
            {
                connection.Open();

                OracleCommand command = connection.CreateCommand();
                OracleTransaction transaction;

                // Iniciar uma transação local
                transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted);
                // Atribuir objeto de transação para uma transação local pendente
                command.Transaction = transaction;

                try
                {
                    command.CommandText = strQuery;
                    command.ExecuteNonQuery();
                    transaction.Commit();
                }
                catch (Exception e)
                {
                    transaction.Rollback();
                }
            }
            return true;
        }
    
asked by anonymous 21.05.2018 / 16:19

0 answers