![]() You can also use registerDriver() method provided by DriverManager class to load the appropriate driver. General form using Class.forName() class.forName(“JDBC Driver Class”) Provided by class Class to load the JDBC driver in order to register it. Steps for connecting to Database using JDBC are explained here along with examples to connect to differenct DBs likeįirst thing you need to do is to register JDBC driver for the DB you are connecting to. Steps for connecting to Database using JDBC Interfaces provided by JDBC for these steps are Driver (That is the interface implemented by the database vendors to provide a JDBC driver for specific databases), Connection, Statement and ResultSet. Steps for connecting any Java application to DB and fetching results using JDBC can be summarized as follows ![]() Statement in database, returning the results and processing that ResultSet. JDBC API provides a set of interfaces and classes for connecting to DB, creating SQL statement, executing created SQL
0 Comments
Leave a Reply. |