How do you know which driver is connected to a database?
Answer Posted / nadia
// 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");
DatabaseMetadata 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 ? | 3 Yes | 1 No |
Post New Answer View All Answers
Explain how data flows from view to db and reverse
How do I load a database driver with JDBC 4.0 / Java 6?
How do I find ojdbc jar version?
Explain the locking system in jdbc?
How many jdbc driver types are there?
What do you mean by two phase commits?
Name the method, which is used to prepare a callablestatement.
How do I stop nullpointerexception?
What is metadata in java programming?
What is jdbc oracle thin?
What is DML?
How can I determine the isolation levels supported by my DBMS?
Is not bound in this context unable to find jdbc spring boot?
How to set NULL values in JDBC PreparedStatement?
What is jndi lookup?