Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find JDBC driver type ?

 
PNS Subramanian
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given a JDBC driver, how do i find the driver type ? Any API available for it ?
 
Anandh Ramesh
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont know the answer for it .but i want to ask you a
question. provided with an api ,how would you use it in the application?
 
PNS Subramanian
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for asking for an API is that, we use different drivers with different databases without actually knowing the type. And given a driver, how do we know what is its type ?
Well, it doesnt make a difference to the end result though as long as the JDBC API's are implemented by the driver.
 
Dilshad Marikar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is the DatabaseMetaData interface; the Connection.getMetaData() method returns an object that implements this. It has methods such as getDriverName(), getDriverVersion().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic