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 jdbc? Describe the steps needed to execute a sql query using jdbc.
What is CLOB and BLOB datatypes in JDBC?
What is the most common example type 1 driver?
What is resultsetmetadata?
How to rollback a JDBC transaction?
Explain the difference between rowset vs. Resultset in jdbc?
What is JDBC Batch Processing and what are it’s benefits?
What is JDBC Driver interface?
What are the differences between statement and preparedstatement interface?
What is metadata in java programming?
What is ojdbc?
What is the fastest type of JDBC driver?
How do I set properties for a JDBC driver and where are the properties stored?
RowSetInternal caller and returns void. What can I do in the readData method?
Is jdbc a middleware?