Autor Beitrag
pigfacejoe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 332
Erhaltene Danke: 1

Win 10, Ubuntu
Delphi,Javascript, PHP, Java, Python
BeitragVerfasst: Mi 14.03.07 21:35 
Hallo,
Ich habe folgendens Problem:
Ich habe einen Timer, der nach 5 min. Einfach den Inhalt eines Mmemo auf meinen FTP Laden soll. Das kommt dann aber nach den 5min. immer zu einer Fehlermeldung. (Connection refused-> Connection reset by peer)
Hier mal der Quelltext der Prozedur Timer2.OnTimer:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
try
Ftp.Passive:=True;
ftp.connect;
ftp.Delete(form1.edit3.text+'beruf.txt');

ftp.put(extractfilepath(Paramstr(0))+'beruf.dll',form1.edit3.text+'beruf.txt',false);
except showmessage('Fehler bei  Upload!');
end;
deletefile(extractfilepath(Paramstr(0))+'beruf.dll');
 image2.picture.LoadFromFile(ExtractFilePath(Paramstr(0))+'hoehle.jpg');
 label2.Caption:='';
 timer2.Enabled:=false;

end;

Natürlich kommen vorher Passwort und alle anderen Daten noch als Eigenschaft von IdFTP.
Ich hoffe, ihr seht den Fehler..
Schönen Gruss,
PigfaceJoe
Ach ja: Wenn ich das ganze ohne Zeitintervall mache, funktioniert alles perfekt.
pigfacejoe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 332
Erhaltene Danke: 1

Win 10, Ubuntu
Delphi,Javascript, PHP, Java, Python
BeitragVerfasst: Do 15.03.07 16:47 
Hm , weiss nicht vlt jm. wie ich das Problem beheben könnte?-Bei einem kleinem Zeitintervall (5sek.) klappts komischerweise
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Do 15.03.07 17:34 
Und wo bitte schön ist das Disconnect?
pigfacejoe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 332
Erhaltene Danke: 1

Win 10, Ubuntu
Delphi,Javascript, PHP, Java, Python
BeitragVerfasst: Do 15.03.07 18:30 
Danke, das war natürlich auch ein Fehler, alleridngs hat sich nichts geändert , es kommt immenroch der Fehler. Hier nochmal der Quelltext:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
try
 ftp.connect;
ftp.put(extractfilepath(Paramstr(0))+'beruf.dll',form1.edit3.text+'beruf.txt',false);

except showmessage('Fehler bei  Upload!');
end;

deletefile(extractfilepath(Paramstr(0))+'beruf.dll');
 image2.picture.LoadFromFile(ExtractFilePath(Paramstr(0))+'hoehle.jpg');
 label2.Caption:='';
 ftp.disconnect;
 timer2.Enabled:=false;


end;
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Do 15.03.07 20:27 
Wo und wie hast Du User und Password eingetragen? Eventuell kann keine Verbindung aufgebaut werden weil die beiden Fehlen.