S
Scott Burke
I use FTPCLIENT aka.... WININET.DLL
I have a button called CDS.
It creates a file, reprot, then FTP the file to CDS.
There is a 2nd button called RE-FTP. If there is a problem with CDS
the file can be RE - FTP again.
The Problem:
The CDS button allways gives a PUT error.
30 seconds later the RE-FTP button works just fine.
both CDS and RE-FTP use the same code?
Here it is:
Function FTP_ONE(fileToFTP1 As String, FTPFileName1 As String)
On Error GoTo FTP_ONE_ERR
DoCmd.Hourglass True
With New FTPClient
.ServerName = "ftp.cdsaccess.com"
.UserName = "pcc"
.Password = "pcc140"
.RemoteDir = "."
.TransferType = "ASC"
.OpenFTP
.OpenServer
.LocalFile = fileToFTP1
.RemoteFile = FTPFileName1
.PutFile
.CloseServer
.CloseFTP
End With
DoCmd.Hourglass False
FTP_ONE_Exit:
Exit Function
FTP_ONE_ERR:
MsgBox Err.Description, vbCritical
Resume FTP_ONE_Exit
End Function
This sounds like a configuration issue. Like WININET.DLL is using somthing
else the first time but cleans it self up for the 2nd try.
Scott Burke
I have a button called CDS.
It creates a file, reprot, then FTP the file to CDS.
There is a 2nd button called RE-FTP. If there is a problem with CDS
the file can be RE - FTP again.
The Problem:
The CDS button allways gives a PUT error.
30 seconds later the RE-FTP button works just fine.
both CDS and RE-FTP use the same code?
Here it is:
Function FTP_ONE(fileToFTP1 As String, FTPFileName1 As String)
On Error GoTo FTP_ONE_ERR
DoCmd.Hourglass True
With New FTPClient
.ServerName = "ftp.cdsaccess.com"
.UserName = "pcc"
.Password = "pcc140"
.RemoteDir = "."
.TransferType = "ASC"
.OpenFTP
.OpenServer
.LocalFile = fileToFTP1
.RemoteFile = FTPFileName1
.PutFile
.CloseServer
.CloseFTP
End With
DoCmd.Hourglass False
FTP_ONE_Exit:
Exit Function
FTP_ONE_ERR:
MsgBox Err.Description, vbCritical
Resume FTP_ONE_Exit
End Function
This sounds like a configuration issue. Like WININET.DLL is using somthing
else the first time but cleans it self up for the 2nd try.
Scott Burke