Monday, November 19, 2012

How to develop a JDBC Application

The following are the steps to develop java appn to communicate with db server:

1. Register the JDBC driver.

2. Get the connection from db server

3. Create the Statement object to send the sql queries to db server.

4. Execute the query.

5. Close the connection.

For JDBC appn there are 2 different packages are ther

Java.Sql  ----- Interfaces
Driver, Connection, Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetadata, DatabaseMetadata

Java.Sql ------Classes
DrverManager, Types,Date


Javax.sql------ Interfaces
DataSource,RowSet

No comments:

Post a Comment