Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Connection conexaoPostgres(){
- Connection con = null;
- try {
- Class.forName("org.postgresql.Driver");
- con = DriverManager.getConnection("jdbc:postgresql://[IP]:[PORTA]/[BASE_DE_DADOS]","[LOG]","[PASS]");
- }
- catch (ClassNotFoundException | SQLException e) {
- System.out.println("Projeto PrjX, classe Dao, método conexaoPostgres, erro: "+e.getMessage());
- }
- return con;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement