- JDBC 4.0 and Oracle JDeveloper for J2EE Development
- Deepak Vohra
- 138字
- 2021-08-25 18:08:44
Connection Interface
The Connection
interface represents a connection with the database. SQL statements may be run in a connection session by using a Statement
object. A Connection
object is in auto-commit
mode, by default. In the auto-commit
mode, changes are committed to the database after an SQL statement is executed. The auto-commit
mode can be modified by calling the setAutoCommit(boolean autoCommit)
method. For example, auto-commit
may be set to false
:
If auto-commit
is set to false
, it would be required to commit changes by calling the commit()
method:
connection.commit();
A Connection
object can be set to read-only by calling the setReadOnly()
method:
connection.setReadOnly(true);
If a Connection
object is not required, close the connection by calling the close()
method:
connection.close();
The following table discusses the methods in JDBC 4.0 that have been added to the Connection
interface.

- ColdFusion 9 Developer Tutorial
- UI 設(shè)計入門一本就夠
- Unity 2D與3D手機游戲開發(fā)實戰(zhàn)
- Photoshop CC入門與進階
- 深入理解OpenCV:實用計算機視覺項目解析(原書第3版)
- BackTrack 5 Wireless Penetration Testing Beginner's Guide
- Adobe創(chuàng)意大學(xué)InDesign產(chǎn)品專家認證標(biāo)準(zhǔn)教材(CS6修訂版)
- Mastering Zabbix
- 中文版Photoshop CS5平面設(shè)計實用教程(第2版)
- Magento: Beginner's Guide
- Origin 2022科學(xué)繪圖與數(shù)據(jù)分析(高級應(yīng)用篇)
- 中文版CorelDRAW X7技術(shù)大全
- 中文版Photoshop 2020基礎(chǔ)培訓(xùn)教程
- Cinema 4D R20完全學(xué)習(xí)手冊
- SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide