Connection Members

Connection Members

Interface Overview | This Package | All Packages

Fields
Name Description
TRANSACTION_NONE Transactions are not supported.
TRANSACTION_READ_COMMITTED Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
TRANSACTION_READ_UNCOMMITTED Dirty reads, non-repeatable reads and phantom reads can occur.
TRANSACTION_REPEATABLE_READ Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
TRANSACTION_SERIALIZABLE Dirty reads, non-repeatable reads and phantom reads are prevented.

Methods
Name Description
clearWarnings() After this call, getWarnings returns null until a new warning is reported for this Connection.
close() In some cases, it is desirable to immediately release a Connection's database and JDBC resources instead of waiting for them to be automatically released; the close method provides this immediate release.
commit() Commit makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
createStatement() SQL statements without parameters are normally executed using Statement objects.
getAutoCommit() Get the current auto-commit state.
getCatalog() Return the Connection's current catalog name.
getMetaData() A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, etc.
getTransactionIsolation() Get this Connection's current transaction isolation mode.
getWarnings() The first warning reported by calls on this Connection is returned.
isClosed() Tests to see if a Connection is closed.
isReadOnly() Tests to see if the connection is in read-only mode.
nativeSQL(String) A driver may convert the JDBC sql grammar into its system's native SQL grammar prior to sending it; nativeSQL returns the native form of the statement that the driver would have sent.
prepareCall(String) A SQL stored procedure call statement is handled by creating a CallableStatement for it.
prepareStatement(String) A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object.
rollback() Rollback drops all changes made since the previous commit/rollback and releases any database locks currently held by the Connection.
setAutoCommit(boolean) If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions.
setCatalog(String) A sub-space of this Connection's database may be selected by setting a catalog name.
setReadOnly(boolean) You can put a connection in read-only mode as a hint to enable database optimizations.
setTransactionIsolation(int) You can call this method to try to change the transaction isolation level using one of the TRANSACTION_* values.