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 the benefit of having jdbcrowset implementation? Why do we need a jdbcrowset like wrapper around resultset?
What is a statement in java?
What is the role of class.forname while loading drivers?
What is jdbc driver for sql server?
What is the JDBC?
Describe how the jdbc application works.
What is jdbc in java?
How does jdbc work?
What are clob and blob data types in jdbc?
What do you mean by jdbc batch processing and what are the advantages of using jdbc batch processing?
How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?
What are the differences between execute, executequery, and executeupdate?
How many ways that we can view a result set?
How many jdbc driver types are there?
What is a statement?