Autor Beitrag
kalle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20

Alles mögliche
D7 ?
BeitragVerfasst: Di 09.12.08 23:33 
Hi an alle
So also das Downloaden von Großen Dateien im thread ich glaube ich habe die
Ursache
Diese kommt nur wenn ich über delphi diesen Download mache .Starte ich das Compilierte Programm ,so
kommt diese meldung nicht. sondern nur ein stehen bleiben des Programmes
Es wird mir bei 99-100% EIdProtocolReplyError 'sent ok' angezeigt.
Wie kann ich diesen fehler abfangen.
PS bei kleineren dateien(Bilder ca 4mb geht das 100%) ohne diesen Fehler.
Wie kann ich diesen Fehler abfangen und auswerten.
Freue mich auf antwort
PS habe jetzt mal ein eigenes Programm nur für den download geschrieben.
da kommt dieser fehler auch.
hier der Code
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, IdBaseComponent, IdComponent,
  IdTCPConnection, IdTCPClient, IdFTP, IdException, Gauges;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    Label1: TLabel;
    Label2: TLabel;
    IdFTP1: TIdFTP;
    Button1: TButton;
    Gauge1: TGauge;
    Label3: TLabel;
    Label4: TLabel;
    Memo1: TMemo;
    procedure Timer1Timer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode;
      const AWorkCount: Integer);
    procedure IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
      const AWorkCountMax: Integer);
    procedure IdFTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
  private
    { Private declarations }
  public
    l,ip:tstringlist;
    id,ip1,userid:string;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);

begin
  if fileexists('c:\databridge\databridge.txt'then begin
  ip:=tstringlist.create;
  ip.loadfromfile('c:\databridge\databridge.txt');
  ip1:=ip.Text;
  idftp1.Host:=ip1;
  end;
 //Benutzer Abfrage
   if fileexists ('c:\databridge\aktivierung.txt')then begin
  l :=TStringlist.Create;
  l.LoadFromFile('C:\databridge\aktivierung.txt');

  id:=l.Text;
////// Ab hier kommt meine UserVerwaltung diese habe ich ausgeschnitten.Funktioniert 100%
dort also kein fehler
   


//#############################
  if userid<>'aktiviert' then begin;
 
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var a,zaehler:integer;
downloadquelle,downloadpfad,downloaddatei,slist:tstringlist;
size:longint;
begin

if not idftp1.connected then idftp1.connect;
if idftp1.connected then form1.Caption:='Verbindung steht';
 downloadquelle:=tstringlist.create;
 downloadpfad:=tstringlist.create;
 downloaddatei:=tstringlist.create;
 if fileexists('c:\databridge\download\downloadquelle.txt'then downloadquelle.LoadFromFile('c:\databridge\download\downloadquelle.txt');
 if fileexists('c:\databridge\download\downloadpfad.txt'then downloadpfad.LoadFromFile('c:\databridge\download\downloadpfad.txt');
 if fileexists('c:\databridge\download\downloaddatei.txt'then downloaddatei.LoadFromFile('c:\databridge\download\downloaddatei.txt');



 for a := 0 to downloaddatei.count -1 do begin
 //try
 //aktuelledatei:=downloadpfad[a];

  label4.caption:=(downloadquelle[a]+downloaddatei[a]);
  gauge1.MaxValue:=idftp1.Size(downloadquelle[a]+downloaddatei[a]);
  begin
  try
  idftp1.get((downloadquelle[a]+downloaddatei[a]) , downloadpfad[a],true);
  except
  {on E:EIdSocketError DO begin
  label4.caption:='Send OK';
  end;
  on E:EIdProtocolReplyError do begin
  form1.caption:='File send';
  end; }

  on EIdProtocolReplyError do form1.caption:='File send';

  end;

 // except
 // on E:EIdSocketError do {IdSocketError is an EIdException descendant that represents an exception class raised when a general socket error occurs. EIdSocketError is used to represent non-protocol specific socket errors that originate from the protocol stack, and provides the LastError property to reflect the numeric error number.}


//  begin
//  idftp1.Connect;
 end;

 end;


end;
{deletefile('c:\databridge\download\downloadquelle.txt');
deletefile('c:\databridge\download\downloadpfad.txt');
deletefile('c:\databridge\download\downloaddatei.txt');
}

//end;

procedure TForm1.IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode;
  const AWorkCount: Integer);
begin

gauge1.Progress:=Aworkcount;
end;

procedure TForm1.IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
  const AWorkCountMax: Integer);
begin

gauge1.Progress:=0;
end;

procedure TForm1.IdFTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
gauge1.Progress:=0;
end;

end.

Freue mich auf Hilfe
MFG Kalli

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt