Package biblioteca.admin.utilidades

Examples of biblioteca.admin.utilidades.ConDb


        this.direccion = direccion;
    }
   
    public Vector getListEmails(){
        Vector<Vector<String>> emailVector = new Vector<Vector<String>>();
        ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();//Obetener conexion existente del pool
                     
            Statement sentencia = conn.createStatement();
           
            String query="select * from email;";
            ResultSet rs=sentencia.executeQuery(query);
View Full Code Here


            }
        }
        return emailVector;
    }
    public void get(Long id){
       ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();//Obetener conexion existente del pool
                     
            Statement sentencia = conn.createStatement();
           
            String query="select direccion from email where id="+id+";";
            ResultSet rs=sentencia.executeQuery(query);
View Full Code Here

                try { conn.close(); } catch (SQLException e) {}
            }
        }
    }
    public void save(){
        ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();//Obetener conexion existente del pool
           
            String query="insert into email values(nextval('sq_email'),?);";
            PreparedStatement pst=conn.prepareStatement(query);
           
            pst.setString(1, this.direccion);
View Full Code Here

            }
        }
    }
   
    public void update(){
        ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();//Obetener conexion existente del pool
           
            String query="update email set direccion=? where id=?";
            PreparedStatement pst=conn.prepareStatement(query);
           
            pst.setString(1, this.direccion);
View Full Code Here

            }
        }
    }
   
    public void delete(){
        ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();//Obetener conexion existente del pool
           
            String query="delete from email where id=?";
            PreparedStatement pst=conn.prepareStatement(query);           
          
            pst.setLong(1, this.id);
View Full Code Here

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        ConDb con=new ConDb();
        Connection conn = null;
        try {
            conn = con.getSource().getConnection();
           
            /*String ins="insert into alumno values(?,?,?,?,?);";
            PreparedStatement pst=conn.prepareStatement(ins);
            pst.setInt(1, 6);
            pst.setString(2, "MARTHA ALICIA");
View Full Code Here

TOP

Related Classes of biblioteca.admin.utilidades.ConDb

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.