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 are the different types of statements in jdbc?
Explain the role of driver in jdbc.
What is @entity in java?
What is odbc and jdbc drivers?
What are the basic exceptions in jdbc?
What are types of jdbc drivers?
What is database connection pooling? Advantages of using a connection pool?
What do you mean by database connection pooling?
What is jdbc driver in java?
Is jdbc open source?
Does jpa use jdbc?
What is the fastest type of JDBC driver?
How can you use preparedstatement in jdbc?
Differentiate between a statement and a preparedstatement.
What are restrictions on triggers?