How do you know which driver is connected to a database?

Answers were Sorted based on User's Feedback



How do you know which driver is connected to a database?..

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

How do you know which driver is connected to a database?..

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

How do you know which driver is connected to a database?..

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

Post New Answer

More JDBC Interview Questions

How can you make the connection using jdbc?

0 Answers  


Which is better jpa or jdbc?

0 Answers  


What are the different types of lockings in jdbc?

0 Answers  


What does the jdbc connection interface?

0 Answers  


What is jdbc thin client?

0 Answers  






What are temp tables ?

0 Answers  


Where jdbc drivermanager class is used?

0 Answers  


What is jdbc odbc driver?

0 Answers  


If you are given a choice to implement the code to either insert a record or update if already exist, which approach will you follow ?

0 Answers  


what are the Different types of exceptions in JDBC?

1 Answers  


Explain the difference between rowset vs. Resultset in jdbc?

0 Answers  


What is jdbc driver in java?

0 Answers  


Categories