Board index » delphi » INDY FTP Session Problem

INDY FTP Session Problem


2004-10-13 05:00:46 AM
delphi251
After I intiate an FTP session I do the following code.
procedure TMain.pSendInvoicePDFs;
var
SearchRec : TSearchRec;
S, D : String;
begin
S := InvoiceUpload + '\';
D := InvoiceDump + '\';
if FindFirst( S + '*.PDF', faAnyFile, SearchRec ) = 0 then
begin
FTPACT.Put(S + SearchRec.Name, SearchRec.Name);
while FindNext(SearchRec) = 0 do
begin
FTPACT.Put(S + SearchRec.Name, SearchRec.Name);
end;
end;
end;
Okay, the problem is that it will do a couple of records and then the
program stops responding.
I have even gone to putting a
if not FTPACT.connnected then
FTPACT.connect
before each Put statement and the program stops
performing code.
Any Ideas?
Are there any FTP speed restrictions?
The PDFs that I am sending are anywhere from 10 K to 20 K in size.
 
 

Re:INDY FTP Session Problem

"Mojoala" <XXXX@XXXXX.COM>writes
Quote
After I intiate an FTP session I do the following code.

procedure TMain.pSendInvoicePDFs;
var
SearchRec : TSearchRec;
S, D : String;
begin
S := InvoiceUpload + '\';
D := InvoiceDump + '\';
if FindFirst( S + '*.PDF', faAnyFile, SearchRec ) = 0 then
begin
FTPACT.Put(S + SearchRec.Name, SearchRec.Name);
while FindNext(SearchRec) = 0 do
begin
FTPACT.Put(S + SearchRec.Name, SearchRec.Name);
end;
end;
end;

Okay, the problem is that it will do a couple of records and then the
program stops responding.

I have even gone to putting a

if not FTPACT.connnected then
FTPACT.connect

before each Put statement and the program stops
performing code.

Any Ideas?

Are there any FTP speed restrictions?

The PDFs that I am sending are anywhere from 10 K to 20 K in size.



 

Re:INDY FTP Session Problem

the program stops responding on the Put
I changed Passive to true. this allow more records
to be transmitted. but sometimes it will stop responding
on the first put.
TIA
 

Re:INDY FTP Session Problem

I have been forced to do this, yuck!
procedure TMain.pSendInvoicePDFs;
var
SearchRec : TSearchRec;
S, D : String;
begin
S := InvoiceUpload + '\';
D := InvoiceDump + '\';
while FindFirst( S + '*.PDF', faAnyFile, SearchRec ) = 0 do
begin
if FindFirst( S + '*.PDF', faAnyFile, SearchRec ) = 0 then
begin
FTPACT.Connect;
FTPACT.Put(S + SearchRec.Name, SearchRec.Name);
FTPACT.Disconnect;
end;
end;
end;
anybody got any better ideas?
TIA