Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8122215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:45:35+00:00 2026-06-06T05:45:35+00:00

I wonder a case. I have a project using a database (Oracle and Mssql).

  • 0

I wonder a case. I have a project using a database (Oracle and Mssql). My project has a framework that I manage transactions.
In thread I open a database connection and start a transaction.(In transaction, there are many update and insert queries.) While code is running, somehow connection is closed. Because I have try-catch block, I catch exception and rollback transaction. BUT; if my connection is closed because some reasons, how rollback query can run on database? How can I handle this situation? If I open a new connection and rollback, does it work?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:45:37+00:00Added an answer on June 6, 2026 at 5:45 am

    There is a term you should know – ACID compliancy:

    • Atomicity is an all-or-none proposition;
    • Consistency guarantees that a transaction never leaves your database in a half-finished state.
    • Isolation keeps transactions separated from each other until they’re finished.
    • Durability guarantees that the database will keep track of pending changes in such a way that the server can recover from an abnormal termination.

    Concerning MySQL

    In order to get this at MySQL, you have to use Transaction Safe Tables (TST). Advantages of Transaction-Safe Tables:

    • Safer. Even if MySQL crashes or you get hardware problems, you can get your data back, either by automatic recovery or from a backup + the transaction log.
    • You can combine many statements and accept these all in one go with the COMMIT command.
    • You can execute ROLLBACK to ignore your changes (if you are not running in auto-commit mode).
    • If an update fails, all your changes will be restored.

    Concerning SQL Server

    You should read “Transaction Behavior On Lost Connection” MSDN forum topic.
    To understand better what lays behind MS SQL Server transactions, read a good article “Locks and Duration of Transactions in MS SQL Server“

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder if using CASE ... WHEN ... THEN expression in MySQL queries has
Here is my case: I have 3 menus (vietnamese, chinese, japanese) that each contains
I have this question when I am studying an open source Android project. I
I'm using Spring/Hibernate combination for my project, with standard CRUD operations. I wonder, is
Let's pretend I have a project directory that isn't a git repository. This project
I am wonder what the scope of the MouseAdapter is in this case. class
wonder why when I export my project to *.air and I install it on
wonder whether someone can help me with the following one... I have a struct
wonder if someone could help me with a little problem. I have session values
I have a SQL Server 2008 database with a composite key: ProjectID (GUID) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.