0 votes
2.4k views
in Servlet by
How to create jdbc application in java? Please provide steps to create jdbc application using JDBC API

1 Answer

0 votes
by

Following steps to crete a JDBC application:

  1. Import packages:- Import all requires packages containing in the JDBC classes which needed for database programming.

    For example: import java.sql.*
  2. Register JDBC driver:- Register the requires JDBC driver which needed you to initialize a driver for opening a communications channel with the database.
  3. Open connection:- To use DriverManager.getConnection() method to create a JDBC Connection object, which represents a physical connection with the database.
  4. Execute query:- Type SQL Statement to build and submit into the database.
  5. Extract data to use resultset:- To use ResultSet.getXXX() method for retrieving the data from resultset.
  6. Clean environment:- Closing all database resources.

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...