Compare commits

...

2 Commits

Author SHA1 Message Date
abc556e3d2 Merge pull request 'COnnexion réussie' (#13) from MedhiJava into main
Reviewed-on: #13
2025-03-12 13:31:36 +01:00
medhi.rodrigues
d9a424bd6e COnnexion réussie 2025-03-12 12:01:49 +01:00
3 changed files with 37 additions and 1 deletions

View File

@ -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");
}

View File

@ -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");
}
}

View File

@ -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);
}