Category: Establishing a Database Connection

INOUT Parameters – Database Connectivity

INOUT Parameters An INOUT parameter acts as both an IN parameter to pass a value to the stored procedure or function and an OUT parameter to return a value from the stored procedure or function. Before the execution of the callable statement, its value can be initialized with a setXXX() method as for an IN

Processing Query Results – Database Connectivity

24.5 Processing Query Results A result set represents a table of rows that is the result of executing a database query. By default, it is not updatable—that is, it cannot be modified. SELECT queries can be executed by the different types of statements that we have encountered so far to create result sets (p. 1522).

Optimizing the Fetch Size – Database Connectivity

Optimizing the Fetch Size To optimize the processing of rows in the result set that resulted from executing a query, only a certain number of these rows are fetched at a time from the database when they are needed by the result set. The default number to fetch, called the default fetch size, is set

Result Set Concurrency – Database Connectivity

Result Set Concurrency The result set concurrency feature enables or disables whether the result set can be updated or not—that is, it indicates the concurrency mode of the result set. By default, the result set concurrency is set to ResultSet.CONCUR_READ_ONLY, which means the result set cannot be updated. Alternatively, updatability can be enabled by setting

Discovering Database and ResultSet Metadata – Database Connectivity

24.7 Discovering Database and ResultSet Metadata The JDBC API allows Java programs to interact with many different types of databases. Obviously, different database providers have different capabilities and default behaviors, and may or may not support certain SQL features. It is possible to obtain such information using the java.sql.DatabaseMetaData object. This object is obtained from