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

What does the jdbc driver interface do?

0 Answers  


How we store procedure in oralce for callable statements in jdbc

0 Answers  


How to test jdbc connection to sql server?

0 Answers  


What is JDBC Transaction Management and why do we need it?

0 Answers  


What is a jdbc connection pool?

0 Answers  






How to rollback a JDBC transaction?

0 Answers  


What are the jdbc statements?

0 Answers  


How to invoke Oracle Stored Procedure with Database Objects as IN/OUT?

0 Answers  


What is sqlwarning and discuss the procedure of retrieving warnings?

0 Answers  


password, is stored in as plain text. What can I do to protect my passwords?

0 Answers  


Is it possible to connect to multiple databases? Using single statement can we update or extract data from two or three or many databases?

0 Answers  


How do java applications access the database using jdbc?

0 Answers  


Categories