reparation des probleme avec la base de donne
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 815 KiB |
@@ -24,6 +24,9 @@ public class CadreDeConnexion extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CadreDeConnexion() {
|
public CadreDeConnexion() {
|
||||||
|
// S'assure que la structure de la base existe même avant la connexion/création de compte
|
||||||
|
GestionBDD.creerTableUtilisateurSiAbsente();
|
||||||
|
GestionBDD.creerTableScoreSiAbsente();
|
||||||
|
|
||||||
// Image de fond de la page de connexion
|
// Image de fond de la page de connexion
|
||||||
Background panelBackground = null;
|
Background panelBackground = null;
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ public class GestionBDD {
|
|||||||
|
|
||||||
private static final String URL = "jdbc:sqlite:UserScoreBDD.db";
|
private static final String URL = "jdbc:sqlite:UserScoreBDD.db";
|
||||||
|
|
||||||
|
// Initialisation automatique de la base de données au chargement de la classe
|
||||||
|
static {
|
||||||
|
creerTableUtilisateurSiAbsente();
|
||||||
|
creerTableScoreSiAbsente();
|
||||||
|
}
|
||||||
|
|
||||||
// connexion BDD
|
// connexion BDD
|
||||||
private static Connection connecter() throws SQLException {
|
private static Connection connecter() throws SQLException {
|
||||||
return DriverManager.getConnection(URL);
|
return DriverManager.getConnection(URL);
|
||||||
|
|||||||
Reference in New Issue
Block a user