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 ?
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 |
Difference Between DDR1, DDR2 and DDR3 memories.
On a nexus, is the metric-type keyword not available in the "default-information originate" command?
What is a transparent bridge?
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.
what is dhcp server?
What are some of the basic steps taken while troubleshooting blue screen errors in win xp?
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
What is meant by DCE and DTE when it comes to Router?
what is dns server?
What is Norton Ghost? How do i create a bootable disc?
Explain different kinds of Switching techniques.