When I am trying to update row with MySQL database. I am randomly getting MySQLTransactionRollbackException exception. For that I have written retry code in
catch (MySQLTransactionRollbackException ex ) {
//Retry Logic
}
But I am using both MySQL and SQL Server databases. So I don't know how to handle this specific exception for SQL Server database? I am not sure even SQL Server database is throwing this kind of exception or it is throwing different exception for this same reason.
usingblocks right before they're used and closed immediatelly