Im developing a project where in the connection to DataBase is static i.e Im hard coding the details of the database in createConnection() method.
Now Im required to dynamically connect to a database i.e in the first page of my project, the user enters the database details(servername,port,username,passowrd,servicename) and using this details my project should be connected to respective database.
One solution to this is to have my createConnection() method as createConnection(String serverName,String portNumber,
String userName,String pword,String s_id).
But my project is very vast and everywhere I have used createConnection() to connect to database, changing this method to createConnection(String serverName,String portNumber,
String userName,String pword,String s_id) everywhere is not possible.
So im looking for an alternative solution.
Thanks in Advance :-)