Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mo 03.10.05 08:49 
Hi, ich schreibe eine DB Anwendung die soll mir Bilder anzeigen, sei es Lokal oder aus dem Web!
Nun Lokal funktioniert das, aber aus dem Web will es nicht funktionieren!

Hier der Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
LinkImage : TImage;

S := Trim(TDBMemo(FField).Text);
if(FileExists(S))then
LinkImage.Picture.LoadFromFile(S);


Muß ich FileExists gegen etwas anderes austauschen?
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Mo 03.10.05 18:02 
Steht in deiner Variablen dann sowas wie "http://google.de/bild.jpg" ? Das ist klar, dass das so nicht funktioniert.
Da müsstest du vorher schauen, wenn vorne ein http steht, dann das Bild über den Webbrowser oder IndyHTTP runterladen und in einen Tempordner speichern und der Routine dann diesen Pfad übergeben!

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mo 03.10.05 18:07 
Ja habe ich auch so gelesen aber ich müßte am besten ExtractFileName machen und den FileNamen in einem
Temporären Ordner speichern und jedes mal beim aktualisieren des Datensatzes prüfen ob das Datum der
Bilddatei mit der im Web übereinstimmt, oder? Falls eine änderung am Bild gemacht wurde!

Wie prüfe ich das Datum der Bilddatei im Web?
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Mo 03.10.05 18:14 
Ungefähr so:
ausblenden Delphi-Quelltext
1:
2:
idhttp1.Get('http://www.google.de/bild.jpg');
idhttp1.Response.LastModified;

weis leider nicht obs genau so funktioniert, habs noch nicht ausprobiert.

Und dann kannst du die Daten ja vergleichen.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mo 03.10.05 18:15 
Vielen Dank für den Hinweis, werd's mal versuchen!