package jdbc;

import java.sql.Connection;
import java.sql.DriverManager;

@Exercice(2)
public class SQLConnection {
    
    public static Connection getConnection(){
            try{
                    
                Class.forName("org.postgresql.Driver");
                Connection conn = DriverManager.getConnection(
                  "jdbc:postgresql://sqletud.univ-mlv.fr:5432/lombardy_db","lombardy","reemeZu1");
                System.out.println("Connection ouverte");
                return conn;
            } catch(Exception e){
                System.out.println("Connection rat�e: "+e);
                System.exit(-1);  
            }
            return null;
    }


 
}
