From d9a424bd6ed4bbe485866d67b964fd2fc549aa65 Mon Sep 17 00:00:00 2001 From: "medhi.rodrigues" Date: Wed, 12 Mar 2025 12:01:49 +0100 Subject: [PATCH] =?UTF-8?q?COnnexion=20r=C3=A9ussie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GSBapplication/src/TEST/test.java | 11 ++++++++ GSBapplication/src/TEST/testMain.java | 25 +++++++++++++++++++ .../src/acces_aux_donnes/connexionSQL.java | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 GSBapplication/src/TEST/testMain.java diff --git a/GSBapplication/src/TEST/test.java b/GSBapplication/src/TEST/test.java index a4ce3fd..1498c43 100644 --- a/GSBapplication/src/TEST/test.java +++ b/GSBapplication/src/TEST/test.java @@ -4,10 +4,21 @@ */ package TEST; +import acces_aux_donnes.connexionSQL; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; + /** * * @author emile.lalorcey */ public class test { + private Connection connexionTest; + private Statement stmt = null; + private ResultSet result = null; + + + connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","admin","admin"); } diff --git a/GSBapplication/src/TEST/testMain.java b/GSBapplication/src/TEST/testMain.java new file mode 100644 index 0000000..0e78631 --- /dev/null +++ b/GSBapplication/src/TEST/testMain.java @@ -0,0 +1,25 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template + */ +package TEST; + +import acces_aux_donnes.connexionSQL; +import java.sql.Connection; + +/** + * + * @author medhi.rodrigues + */ +public class testMain { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + + Connection connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","adminGSB","mdpGSB"); + + } + +} diff --git a/GSBapplication/src/acces_aux_donnes/connexionSQL.java b/GSBapplication/src/acces_aux_donnes/connexionSQL.java index 53d58c2..b83de12 100644 --- a/GSBapplication/src/acces_aux_donnes/connexionSQL.java +++ b/GSBapplication/src/acces_aux_donnes/connexionSQL.java @@ -51,7 +51,7 @@ public class connexionSQL { * @return connection établie */ public static Connection getConnect(String serveur, String bdd, String nomUtil, String mdp) { - System.out.println("getConnect"); + System.out.println("Connexion validé"); if (connect == null) { new connexionSQL(serveur, bdd, nomUtil, mdp); }