Connection interface in java

A Connection object's database can give data portraying its tables, its upheld SQL punctuation, its put away systems, the abilities of this association, et cetera. This data is gotten with the getMetaData strategy.

The Connection interface give numerous routines to exchange administration like commit(),rollback() and so forth. As a matter of course, association confers the progressions subsequent to executing questions.

Generally utilized techniques for Connection interface:

  • public Statement createStatement(); makes an announcement protest that can be utilized to execute SQL questions.
  • public Statement createStatement(int resultSetType,int resultSetConcurrency); Creates a Statement protest that will produce ResultSet objects with the given sort and simultaneousness.
  • public void setAutoCommit(boolean status); is utilized to set the confer status.By default it is valid.
  • public void commit(); spares the progressions made subsequent to the past submit/rollback changeless.
  • public void rollback(); Drops all progressions made following the past confer/rollback.
  • public void close();shuts the association and Releases a JDBC assets quickly.