Ver Mensaje Individual
  #2  
Antiguo 30-11-2005
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.320
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
¿De qué tipo es la imagen (no lo comentas)?
¿Qué pasará si el campo está vacío?

Haz una pruebas...

Código Delphi [-]
 var
   Str:String;
 begin
 
   // Cargar la cadena
   Str := TablaSocios.FieldByName('PathFoto').AsString;
   // Es nulo? ==> salgo (pueds usar cualquiera de las dos condiciones)
   if (Str = '') or (TablaSocios.FieldByName('PathFoto').IsNull) then begin
     Exit;
   end;
 
   // Path de la foro (comprobación -luego lo quitas-)
   MessageDlg(Format('Path de la foto: %s',[Str]), mtInformation, [mbOK], 0);
   // Accedemos a la foto
   if (FileExists(Str)) then begin
     Image1.Picture.LoadFromFile(Str);
   end;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita