/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package prymenu;
import java.sql.*;
/**
*
* @author Administrador
*/
public class Conectar {
Connection cn=null;
Statement stmt=null;
ResultSet rs=null;
int fila=0;
String sql="";
public Conectar(){
try{
Class.forName("org.postgresql.Driver").newInstance();
System.out.println("Driver instalado");
cn=DriverManager.getConnection("jdbc:postgresql://localhost/PORTAL_WEB","postgres","sistemas");
System.out.println("Base conectada");
}catch(Exception e){
System.out.println("Error= "+e.getMessage());
}
}
}
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario