Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 633944e5 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- Added the full 5-arguments connect

parent c3fad554
Branches
Tags
No related merge requests found
......@@ -31,6 +31,7 @@ public interface DBService {
public void connect(String user, String password) throws SQLException; // password in database
public void connect(String port, String user, String password) throws SQLException; // password in database
public void connect(String IPAdress, String port, String user, String password) throws SQLException; // with userID, password in database
public void connect(String IPAdress, String port, String user, String password, String database) throws SQLException; // with userID, password in database
public Connection getConnection();
public void close();
......
......@@ -66,6 +66,10 @@ public class DBServiceImpl implements DBService{
}
public void connect(String IPAddress, String port, String user, String password ) throws SQLException {
connect( IPAddress, port, user, password, database );
}
public void connect(String IPAddress, String port, String user, String password, String database ) throws SQLException {
conn = DriverManager.getConnection(driverPrefix+"://"+IPAddress+":"+port+"/"+database, user, password);
st = (Statement) conn.createStatement();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment