Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/04/2013, 10:43
jmm87
 
Fecha de Ingreso: octubre-2012
Mensajes: 202
Antigüedad: 11 años, 6 meses
Puntos: 0
Respuesta: Obtener valor de bd a un texfield

aqui por las dudas tambien tienen la clase CONEXION
Código java:
Ver original
  1. import java.sql.Connection;
  2. import java.sql.DriverManager;
  3.  
  4. public class Conexion {
  5.     public static Connection getConnection() throws Exception{
  6.         String driver="com.mysql.jdbc.Driver";
  7.         String dir="jdbc:mysql://localhost/sistemamontes";
  8.         String user="root";
  9.         String pwds="";
  10.  
  11.         Class.forName(driver).newInstance();
  12.         return DriverManager.getConnection(dir, user, pwds);
  13.     }
  14. }