aspose file tools*
The moose likes JDBC and the fly likes generic Jdbc code which can take different vendor database and driver selection from user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "generic Jdbc code which can take different vendor database and driver selection from user" Watch "generic Jdbc code which can take different vendor database and driver selection from user" New topic
Author

generic Jdbc code which can take different vendor database and driver selection from user

ravi taneja
Greenhorn

Joined: Aug 28, 2012
Posts: 1
Hi guys,
want to build a jdbc code which can have database choice and driver selection entered by user. we should be able to load the driver and pass the connection url for different databases at runtime........Please help me out...
ravi
Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Wei please use code tags, see how much prettier and easy to read they make your code.

Anyway expecting users to know the driver name is a bit off.

We used to have a properties file with the actual details, then the user could choose a helpfull name, and that linked to all of the dirty details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generic Jdbc code which can take different vendor database and driver selection from user