FTP transfer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top