Solution for "The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements."
This error relates to the .Net Framework when doing a connection to a database, using a transaction.
1. You hit the timeout, increase the transaction timeout to avoid premature ending
using(TransactionScope scope =newTransactionScope(TransactionScopeOption.Required,newSystem.TimeSpan(0,15,0))){// The current example sets the transaction timeout to 15 minutes, increase it to reflect your needs}
It can also be necessary to increase the setting in the machine.config file, like this
Transakce přidružená k aktuálnímu připojení byla dokončena, ale nebyla vyřazena. Aby mohlo být připojení použito k provedení příkazů SQL, musí být transakce nejprve vyřazena.
La transacción asociada con la conexión actual se ha completado, pero no se ha eliminado. Debe eliminarse antes de utilizar la conexión para ejecutar instrucciones SQL.
Transakcja skojarzona z bieżącym połączeniem została zakończona, ale nie została usunięta. Należy usunąć transakcję, aby można było używać połączenia w celu wykonywania instrukcji SQL.
Transaktionen som är associerad med den aktuella anslutningen har slutförts men inte tagits bort. Transaktionen måste tas bort innan anslutningen kan användas för att köra SQL-satser.
Geçerli bağlantıyla ilişkili işlem tamamlandı ancak atılmadı. Bağlantının SQL deyimleri yürütmek amacıyla kullanılabilmesi için işlemin atılması gerekiyor.
Disclaimer
Those solutions have been provided to you without any guarantee, they have been found on different help forums and brought to you here to ease your resolution process.