Database transfer (copy)

G

Guest

Dear Sirs
Is it possible to transfer a whole DB to an FTP server with one command
button click?
If yes, how?
Thanks
Klaus
 
G

Guest

Dear Alex
thanks for your help. I changed it into the following code to upload my
databse to the FTP at my ISP.
********** Code Start ****************
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
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 = vbNullString
.DestinationFile = "ftp://ftp2.xxxxxxx.es/Data/"
.AutoCreateRemoteDir = True
If Not .IsConnected Then .DialDefaultNumber
.ConnectToFTPHost "dom-xxxxxxx-barna.com", "xxxlf2"
.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

Now I have to more questions:
a) How does this module know which file I would like to transfer? (the file
to be transferred has the name "transferdb.mdb
b) how can I create the module?
 

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