The JDBC Connection Class

From InterBase
Jump to: navigation, search

Go Up to Using the JDBC Interfaces


After instantiating a Driver object, you can open a connection to the database when DriverManager gives you a Connection object. A database driver can manage many connection objects.

The Connection object establishes and manages the connection to your particular database. Within a given connection, you can execute SQL statements and receive the result sets.

The java.sql.Connection interface represents a connection to a particular database. The JDBC specification allows a single application to support multiple connections to one or more databases, using one or more database drivers. When you establish your connection using this class, the DriverManager selects an appropriate driver from those loaded based on the subprotocol specified in the URL, which is passed as a connection parameter.