Ver Mensaje Individual
  #4  
Antiguo 14-09-2010
lince_36 lince_36 is offline
Miembro
 
Registrado: mar 2010
Posts: 12
Reputación: 0
lince_36 Va por buen camino
La solucion a mi problema ya casi la tenia, solo hacia falta agregar algo al query, este queda asi:

Código PHP:
 String id_foto=tes.getText();
        try
{
   
res=sen.executeQuery("SELECT foto FROM fotos where id_foto='" id_foto "'");
            
    if(
res.next())
    {
        
Image i=null;
        
Blob blob res.getBlob("foto");
        
ijavax.imageio.ImageIO.read(blob.getBinaryStream());
        
ImageIcon image = new ImageIcon(i);
        
lbl1.setIcon(image);
    }
}
catch(
Exception e)
{
    
JOptionPane.showMessageDialog(this,e.getMessage());

Y funciona perfecto.

Saludos
Responder Con Cita