How do you know which driver is connected to a database?
Answer Posted / ramakant
// By the help of DatabaseMetadata it gives all the
information about the date base for which our progrim is
connected
// here it goes
1.Class.forName("DriverClass name");
2.Connection con =driverManager.getConection("URL Of
Manager Class");
DatabaseMetada dmeta= con.getMetadata();
// by calling the method getDriverName() name we can
able to know that which driver is coonected to the database.
3. System.out.println(" driver name " +
dmeta.getDriverName())
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is ojdbc?
Which package is used for jdbc application?
any one can explain about policy file rule? when i connect database with applet then ther is no compile time error but the run time error is occureed.i.e access is denied.policy file rule is related to this problem.
What is jdbc url for mysql?
How the JDBC application works?
Which is better jpa or jdbc?
What is a datasource in java?
What is statement and preparedstatement in java?
What is JDBC Statement?
State the three different ways in which you can create a table?
Does jpa use jdbc?
Which type of JDBC driver is the fastest one?
Give an example of code used for setting up connection with a driver.
If I use the JDBC API, do I have to use ODBC underneath?
What are the common tasks of JDBC?