In this Tutorial we want to describe you a code that help you in understanding JDBC Drive for Mysql. The code include a class JdbDriveForMysql,Inside the main method we declared a string driver initialized with "com.mysql.jdbc.Driver".The try block include the following steps-
Driver loading: loading a driver is the first step by calling a class.forname( ) and passed driver class as argument. Once the driver is loaded ,you connect the front end of the Java application to the backend database. In case there will be an exception occurred in loading a database driver in the try block. The catch block check the exception and println print the exception.
Finally the println print the value of jdbc driver for mysql is specified in string driver.
jdbc driver for mysql : com.mysql.jdbc.Driver
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: November 17, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles