Summary
The JDBC package is a large piece of technology. This chapter described the basic techniques for connecting a Java application to PostgreSQL using JDBC and the PostgreSQL JDBC driver. It does not cover a few of the more advanced JDBC topics.
The Connection class includes methods that can commit and roll back transactions—of course, you can do that yourself by executing COMMIT and ROLLBACK commands.
The examples in this chapter intercept database errors by catching exceptions. JDBC also throws exceptions for database warnings.
One of the more interesting features added to the JDBC 2.0 specification is the updateable ResultSet. This feature lets you update, insert, and delete rows in a result set by directly modifying the ResultSet, rather ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access