4.2 JDBC APPLICATION FUNDAMENTALS As we discussed in Section 3.1 in Chapter 3, to run a Java database application to perform data actions against the selected database, the JDBC API
Category: JDBC Escape Syntax
Establish a Database Connection – JDBC Applications and Design ConsiderationsEstablish a Database Connection – JDBC Applications and Design Considerations
4.2.2.5 Establish a Database Connection Now we have a clear picture and understanding of the fundamentals in the DriverManager and Driver classes as well as the related database connection methods.
Creating the PreparedStatement Object – JDBC Applications and Design ConsiderationsCreating the PreparedStatement Object – JDBC Applications and Design Considerations
4.2.3.3.1 Creating the PreparedStatement Object Refer to Table 4.3. The prepareStatement() method defined in the Connection interface is used to create a PreparedStatement object. Example code to create a PreparedStatement
Creating the CallableStatement Object – JDBC Applications and Design ConsiderationsCreating the CallableStatement Object – JDBC Applications and Design Considerations
4.2.3.4.2 Creating the CallableStatement Object To create a CallableStatement object, you need to use one of methods defined in the Connection class (refer to Table 4.3), prepareCall(). When SQL92 syntax
Creating and Executing Oracle Statements – JDBC Applications and Design ConsiderationsCreating and Executing Oracle Statements – JDBC Applications and Design Considerations
4.2.3.6 Creating and Executing Oracle Statements Executing any execution method we discussed in the previous sections is exactly the same as exe-cuting a string representing an Oracle statement. In fact,
JDBC Escape Syntax – JDBC Applications and Design ConsiderationsJDBC Escape Syntax – JDBC Applications and Design Considerations
4.2.3.6.3 JDBC Escape Syntax When JDBC performs an Oracle statement, it does not check the Oracle grammar, and you can send any Oracle statement to your database. This gives you
The ResultSet Interface – JDBC Applications and Design ConsiderationsThe ResultSet Interface – JDBC Applications and Design Considerations
4.2.4.1 The ResultSet Interface Data is stored in a ResultSet just as it is returned by the database: it is stored in tabular format. Each field of the database can
Using JDBC MetaData Interfaces – JDBC Applications and Design ConsiderationsUsing JDBC MetaData Interfaces – JDBC Applications and Design Considerations
4.2.5 Using JDBC MetaData Interfaces In addition to general and popular data information provided by three statement interfaces and execution methods, JDBC also provides useful and critical information and descriptions
Using the DatabaseMetaData Interface – JDBC Applications and Design ConsiderationsUsing the DatabaseMetaData Interface – JDBC Applications and Design Considerations
4.2.5.2 Using the DatabaseMetaData Interface Compared with other metadata interfaces, the DatabaseMetaData is the largest, with over 150 methods. This interface is mainly used by developers who are building database
Using the ParameterMetaData Interface – JDBC Applications and Design ConsiderationsUsing the ParameterMetaData Interface – JDBC Applications and Design Considerations
4.2.5.3 Using the ParameterMetaData Interface Detailed information about the parameters passed into or from the database can be obtained by calling the getParameterMetaData() method that is defined in the PreparedStatement