Using DriverManager.registerDriver() : JDBC Driver « Database « Java Tutorial





//String className = "org.gjt.mm.mysql.Driver";
try {
   // Registers the given driver with the DriverManager.
   DriverManager.registerDriver(new org.gjt.mm.mysql.Driver());
   // here the class is loaded

}
catch (SQLException e) {
   e.printStackTrace();
}










20.1.JDBC Driver
20.1.1.What is JDBC?
20.1.2.What is a JDBC Driver?
20.1.3.Loading a JDBC Driver: Using Class.forName()
20.1.4.Using DriverManager.registerDriver()
20.1.5.To test a JDBC driver installation using Oracle
20.1.6.To test a JDBC driver installation using MySQL