How can I run my java1.4 jdbc console application without loading the jdbc driver programatically...
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35232
7
posted
0
What do you mean by "loading the jdbc driver programatically"? It needs to be loaded somehow. You can avoid having the driver name and url in the code by passing them as properties on the command line, or keeping them in a properties file.
[ March 13, 2006: Message edited by: Ashutosh Limaye ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35232
7
posted
0
I'm curious: You go to some length keeping the DB properties out of the code, but hardcode the name of the properties file where they are kept? Or is this just an example?
Ashutosh Limaye
Ranch Hand
Joined: Oct 24, 2005
Posts: 58
posted
0
Yes the DB properties are kept in a property file called "testprop.property"
It has Name-Value pair...Now you can add as many databases types repeating the above four lines for each driver ...and that won't affect your application...also I actually wanted to put the System.setProperty() in a static block....but again ...i'll try that out.