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
What is the difference between ojdbc6 and ojdbc7?
What does executeupdate return in jdbc?
What are jdbc and its components?
Does jpa use jdbc?
Explain about the drive manager class working?
What is jdbc servlet?
How do I insert/update records with some of the columns having NULL value?
What are restrictions on triggers?
Briefly tell about the jdbc architecture.
How do I find jdbc version?
What is ODBC and JDBC? How do you connect the Database?
Does sql allow null values ? Can we use it within where clause ?
How do I insert an image file (or other raw data) into a database?
What is ojdbc?
Can I use JDBC to execute non-standard features that my DBMS provides?