I need to know the driver name associated with the DSN ?
In java we can get it by using getDriverName()(implemented
by 3rd party vendors.) method ?
but i need the implemetation to get the driver name?
so can u give me the code ? how to get the code ?



I need to know the driver name associated with the DSN ? In java we can get it by using getDriverNa..

Answer / Shobhit Jain

To obtain the JDBC driver name, you can use the java.sql.DriverManager class's getDriver() method. However, keep in mind that each database vendor provides its own specific JDBC driver with a unique implementation of the Driver interface. Here is an example using the MySQL JDBC driver:nn// Load the drivernClass.forName("com.mysql.jdbc.Driver");nn// Get a connectionnString url = "jdbc:mysql://localhost/mydb";nString user = "myusername";nString password = "mypassword";nConnection conn = DriverManager.getConnection(url, user, password);nn// Retrieve the driver namenDriver driver = conn.getDriver();nString driverName = driver.getClass().getName();

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Networking AllOther Interview Questions

Difference Between DDR1, DDR2 and DDR3 memories.

1 Answers   Amdocs,


On a nexus, is the metric-type keyword not available in the "default-information originate" command?

1 Answers   Cisco,


What is a transparent bridge?

1 Answers  


1.what i gain frist knowledge in networking ?plz tell me step by step point that i preaper for career because i m frasher 2.tell me main basic topic of MCSE.

0 Answers  


what is dhcp server?

4 Answers  


What are some of the basic steps taken while troubleshooting blue screen errors in win xp?

11 Answers   DELL, Wipro,


What is the difference between TFTP and FTP application layer protocols?

9 Answers   DELL, Elgi Equipments, HCL, Wipro,


NFS server + Solaris client + Linux client, all connected at GigE to the same switch. The Linux client is fast but the Solaris client is slow. Explain troubleshooting steps

1 Answers   ABC,


What is meant by DCE and DTE when it comes to Router?

3 Answers  


what is dns server?

3 Answers  


What is Norton Ghost? How do i create a bootable disc?

1 Answers  


Explain different kinds of Switching techniques.

1 Answers  


Categories
  • Networking Protocols Interview Questions Networking Protocols (671)
  • Networking Administration Interview Questions Networking Administration (1008)
  • Networking Security Interview Questions Networking Security (196)
  • Networking General Interview Questions Networking General (266)
  • Networking AllOther Interview Questions Networking AllOther (430)