Saturday, 5 September 2015

What are the basic steps to create a JDBC application?

Following are the basic steps to create a JDBC application:
  1. Import packages containing the JDBC classes needed for database programming.
  2. Register the JDBC driver, so that you can open a communications channel with the database.
  3. Open a connection using the DriverManager.getConnection () method.
  4. Execute a query using an object of type Statement.
  5. Extract data from result set using the appropriate ResultSet.getXXX () method.
  6. Clean up the environment by closing all database resources relying on the JVM's garbage collection.

No comments:

Post a Comment