A
Amateur
Dear Sirs
I try to transfer a DB to my FTP server with a command button- I use the
following code. I mention the Target, I mention the sorce file, I mention the
destination file and my login and password - But nothing happens, no error
message no transfer just nothing. Can someone help?
Sub TestFTPUpload()
On Error GoTo ErrHandler
Dim objFTP As InetTransferLib.FTP
Const conTARGET = "ftp://ftp2.XXXXXX.es"
Set objFTP = New InetTransferLib.FTP
With objFTP
.FtpURL = conTARGET
.SourceFile = “C:\Documents and Settings\Klaus
Müller\Desktop\cps208web\transferdb.mdbâ€
.DestinationFile = "ftp://ftp2.arrakis.es/Data/"
.AutoCreateRemoteDir = True
If Not .IsConnected Then .DialDefaultNumber
.ConnectToFTPHost "dom-bellfield.com", "bellf"
.UploadFileToFTPServer
End With
ExitHere:
On Error Resume Next
Set objFTP = Nothing
Call SysCmd(acSysCmdRemoveMeter)
Exit Sub
ErrHandler:
MsgBox Err.Number & vbCrLf & Err.Description, _
vbCritical + vbOKOnly, Err.Source
Resume ExitHere
End Sub
I try to transfer a DB to my FTP server with a command button- I use the
following code. I mention the Target, I mention the sorce file, I mention the
destination file and my login and password - But nothing happens, no error
message no transfer just nothing. Can someone help?
Sub TestFTPUpload()
On Error GoTo ErrHandler
Dim objFTP As InetTransferLib.FTP
Const conTARGET = "ftp://ftp2.XXXXXX.es"
Set objFTP = New InetTransferLib.FTP
With objFTP
.FtpURL = conTARGET
.SourceFile = “C:\Documents and Settings\Klaus
Müller\Desktop\cps208web\transferdb.mdbâ€
.DestinationFile = "ftp://ftp2.arrakis.es/Data/"
.AutoCreateRemoteDir = True
If Not .IsConnected Then .DialDefaultNumber
.ConnectToFTPHost "dom-bellfield.com", "bellf"
.UploadFileToFTPServer
End With
ExitHere:
On Error Resume Next
Set objFTP = Nothing
Call SysCmd(acSysCmdRemoveMeter)
Exit Sub
ErrHandler:
MsgBox Err.Number & vbCrLf & Err.Description, _
vbCritical + vbOKOnly, Err.Source
Resume ExitHere
End Sub