Código:
lo he intentado así:public class CONEXION_DB {
public void insertar(String telef, String nomb) throws ClassNotFoundException, SQLException{
Class.forName("org.postgresql.Driver");
Connection Conexion = DriverManager.getConnection("jdbc:postgresql://localhost:5432/test", "postgres", "1234567890");
java.sql.Statement SentenciaSQL = Conexion.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet Personas = SentenciaSQL.executeQuery("SELECT * FROM usuarios");
....
....
....
....
}
public String consultar(String telef) throws ClassNotFoundException, SQLException{
String Nombre;
Class.forName("org.postgresql.Driver");
Connection Conexion = DriverManager.getConnection("jdbc:postgresql://localhost:5432/test", "postgres", "1234567890");
java.sql.Statement SentenciaSQL = Conexion.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet Personas = SentenciaSQL.executeQuery("select nombre from usuarios
....
....
....
Código:
pero no lo consigo. public class CONEXION_DB {
CONEXION_DB(){
aqui meto los datos de la conexión//
}


