hongyi
08-15-2002, 09:39 AM
Currently, i have hardcoded the server connection in every page and is very tedious if there are any changes to it.
Therefore, i need to know how to connect to the server by calling up a page that contains the server information.
The coding i have now is:
String connectionURL = "jdbc:mysql://servername/databaseName?user=username to enter the server & password=password to enter the server";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "", "");
statement = connection.createStatement();
pls help....
Therefore, i need to know how to connect to the server by calling up a page that contains the server information.
The coding i have now is:
String connectionURL = "jdbc:mysql://servername/databaseName?user=username to enter the server & password=password to enter the server";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "", "");
statement = connection.createStatement();
pls help....