Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ public void Conectar() {
- try {
- conexion = DriverManager.getConnection("jdbc:mysql://localhost/sistema_gmg", "root", "1405");
- st = conexion.createStatement();
- rs = st.executeQuery("Select * from ciclos");
- rs.next();
- this.jtf_id_ciclo.setText(rs.getString("id_ciclo"));
- this.jtf_ciclo.setText(rs.getString("ciclo"));
- this.jtf_finicio.setText(rs.getString("fecha_inicio"));
- this.jtf_ftermino.setText(rs.getString("fecha_termino"));
- } catch (SQLException err) {
- JOptionPane.showMessageDialog(null, "Error " + err.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement