How do you know which driver is connected to a database?
Answers were Sorted based on User's Feedback
Answer / venkat
Whenever u want to connect with DB
U need to config two
They r
1.Class.forName("DriverClass name");
2.Connection con =driverManager.getConection("URL Of
Manager Class");
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / 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 |
Answer / 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 |
What is the major difference between java.util.date and java.sql.date data type?
Differentiate between type_scroll_insensitive and type_scroll_sensitive.
What is metadata in java programming?
List the advantages of using datasource?
What is jdbc type?
what does the method Class.forName returns?
What are the components of jdbc?
What is the difference between client and server database cursors?
what is the difference between SENSITIVE and INSENSITIVE?
explain about special characters?
what is metadata and it's use?
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?