-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutilitaire.java
More file actions
45 lines (38 loc) · 1.18 KB
/
utilitaire.java
File metadata and controls
45 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package projet_final;
import java.sql.*;
/**
*
* @author ddaar
*/
//cette classe gere la connexion a la base de donne
public class utilitaire {
Connection connection = null;
String data_base_path = "jdbc:derby://localhost:1527/evaluation_finale";
String username = "darryl";
String password = "dd";
/**
*
* @throws SQLException
*/
utilitaire(String data_base_path, String username, String password) {
this.data_base_path = data_base_path;
this.username = username;
this.password = password;
}
utilitaire() {
this.data_base_path = System.in.toString();
this.username = System.in.toString();
this.password = System.in.toString();
}
public void connection_() throws SQLException {
connection = DriverManager.getConnection(data_base_path, username, password);
}
public void deconnection_() throws SQLException {
connection.close();
}
}