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

  • Home
  • SEARCH
  • 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 6723163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:32:10+00:00 2026-05-26T09:32:10+00:00

Do I have to call connection.setAutoCommit(false) in order to group a few DML statements

  • 0

Do I have to call connection.setAutoCommit(false) in order to group a few DML statements in one transaction? I’m a bit confused because jdbc doc says that a new connection is created in auto-commit mode. At the same time, Oracle doesn’t have auto-commit transactions, a DML statement begins a new transaction if it doesn’t exist. So, in my understanding, connection.setAutoCommit(false) is redundant (assuming I don’t consider switching to a different RDMS).

Could anyone clarify this?

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-05-26T09:32:11+00:00Added an answer on May 26, 2026 at 9:32 am

    setting autocommit to true means in fact that each statement sent to the database will be enclosed in a begin/commit. A transaction will be started implicitely, but it will also be committed implicitely. And the same will be true for the next statement.

    If you want several statements to be part of a single transaction, you’ll need to set autocommit to false, execute your various statements, and finally call commit explicitely.

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

Sidebar

Related Questions

I have Visual Studio .Net project which uses ADO connection to call stored procedure
I have to modify a few tables in one function. They must all succeed,
I have a collection of objects of the same type, let's call it DataItem
I have to call ping from c++ code.I'd like to easily read the output
I have to call some code in a SharePoint site that runs under the
I have a call to a third-party C++ library which I have put into
I have to call an existing AMF Method in a PHP (or Perl) Script
I have to call phone number and detect if the modem at the opposite
I have a call to Read on NetworkStream objeck, which uses Socket.Receive internally. Say
do I have to call super in didTurnIntoFault ? I couldn't find any directions

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.