Hello. Sorry I have try to find information in internet but is not much about autocommit mode.
Wrong answer: When a JDBC Connection is created, its commit mode depends on the parameters used while creating the connection.
Based on answer, is that true that there is no option using Properties to set auto-commit to false or to try set up this value in DB URL to make answer two correct.
About Question enthuware.ocpjp.v7.2.1167 :
Moderator: admin
-
- Posts: 19
- Joined: Mon Sep 01, 2014 9:45 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1167 :
As per https://docs.oracle.com/javase/7/docs/a ... ction.html :
Paul.
HTH,By default a Connection object is in auto-commit mode, which means that it automatically commits changes after executing each statement.
Paul.
-
- Posts: 38
- Joined: Fri Nov 13, 2015 4:40 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1167 :
Hmm... "by default" could mean "default before setting autocommit", or "default unless you set a property".
There might be JDBC drivers out there that interpreted the spec according to the latter.
Also, there are JDBC drivers that simply get it wrong.
Not sure what the Oracle exam wants us to answer to such a question. Or how precise the wording on the Oracle exam would be.
There might be JDBC drivers out there that interpreted the spec according to the latter.
Also, there are JDBC drivers that simply get it wrong.
Not sure what the Oracle exam wants us to answer to such a question. Or how precise the wording on the Oracle exam would be.
-
- Posts: 8
- Joined: Mon Nov 02, 2020 10:21 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1167 :
Here's some evidence that there are some JDBC drivers that support the setting of a property for autocommit:
https://www.ibm.com/support/knowledgece ... onprop.htm
https://www.ibm.com/support/pages/error ... ommit-mode
https://www.ibm.com/support/knowledgece ... onprop.htm
https://www.ibm.com/support/pages/error ... ommit-mode
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1167 :
Thanks for the info. For the purpose of the exam, you should assume that a connection is in auto-commit mode if you haven't called setAutoCommit(false).
Who is online
Users browsing this forum: No registered users and 9 guests