Jdbc Connection Interface

Google Advertisements

Prev Tutorial Next Tutorial

Connection Interface in JDBC

A Connection is the session between java application and database. The Connection interface is a factory of Statement, PreparedStatement, and DatabaseMetaData i.e. object of Connection can be used to get the object of Statement and DatabaseMetaData. The Connection interface provide many methods for transaction management like commit(),rollback() etc.

Method of Connection Interface

1 public Statement createStatement()creates a statement object that can be used to execute SQL queries.
2public Statement createStatement(int resultSetType,int resultSetConcurrency)Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
3 public void setAutoCommit(boolean status)Used to set the commit status.By default it is true.
4 public void commit()saves the changes made since the previous commit/rollback permanent.
5 public void rollback() Drops all changes made since the previous commit/rollback.
6public void close():closes the connection and Releases a JDBC resources immediately.

Prev Tutorial Next Tutorial

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements

Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: hitesh.xc@gmail.com or 8076671483 Try this Keyword C++ Programs