Hello all,
I am trying to write a class that will allow me to connect to various different databases as long as I pass in the class, url, username and password in java i.e:
Code:
MyClass c = new MyClass().
c.driver="<path_to_driver>";
c.url="jdbc:mysql:/localhost/database";
c.username="user"
c.password="private"
vector = c.sql( "select column1, column2 from database;" );
I'm sure with a bit of effort this is possible, but are there any examples? has this been done before so i dont have to worry about it????
I believe that sqldeveloper( written by oracle ) does something similar with the databases however I could not locate the code for the connections.
thanks, trscookie.