ftp file automation

R

roger dave

I need to ftp a db object to a web address...the only
thing is I need to automate the whole process so that when
the user clicks on a button automatically the file will be
ftp'd to the web address. Unfortunately I cannot use the
Macros. i need to use code...anyone has any code to do
this?
 
R

Richard Choate

I have the code but it is not quick & easy. After looking into this
thoroughly for a project for my client, I determined that the best (and
maybe only decent) way is to use API calls. The code uses several API
functions I have stored in one module, and then some form code to call the
functions and ftp the db back and forth from the web server.

I looked into the Microsoft INET control that comes with Office Developer,
but after testing it I found it to be wholly inadequate for all but the
simplest of situations (only anonymous server worked. No password). Also,
you would have to package the control with a db app because you can't just
send it to someone who doesn't have Developer. Meanwhile, the API calls
worked great. Check the KB or the VBA Developers Handbook & see if you can
find the functions for this. It is a lot of code to just post here.
Richard Choate


I need to ftp a db object to a web address...the only
thing is I need to automate the whole process so that when
the user clicks on a button automatically the file will be
ftp'd to the web address. Unfortunately I cannot use the
Macros. i need to use code...anyone has any code to do
this?
 
J

Joe Fallon

Richard,
I also use the API for ftp. (In VB.Net I found a class that works fine.)
But I tested the ActiveX control and it worked fine and was quite simple to
use.
It allowed log-in UID and PWD information.

I think I got mine from VB6 though.

Just drop this on a form:
InetCtls.Inet.1


Private Sub ftpDownloadButton_Click()

With Inet1
.URL = txtURLbox
.UserName = txtUID
.Password = txtPWD
.Execute , "GET " & txtServerPath & " " & txtLocalPath
End With

End Sub
 
R

Richard Choate

Joe,
Not only did I test this thing quite thoroughly on my own, I ended up using
Microsoft paid support over it. They tried it on a private server and were
also unable to make it work well. I think it would connect and maybe get a
directory list, but it would not allow the transfer of my files in both
directions. This was the case for the MS guys also. I just don't trust it.
Anyway, you know how it is. I would have to package the thing for someone to
use it, and that just isn't practical for your basic Access database.

By the way, your code looks *VERY* familiar. I tried in myself.

Thanks,

Richard

Richard,
I also use the API for ftp. (In VB.Net I found a class that works fine.)
But I tested the ActiveX control and it worked fine and was quite simple to
use.
It allowed log-in UID and PWD information.

I think I got mine from VB6 though.

Just drop this on a form:
InetCtls.Inet.1


Private Sub ftpDownloadButton_Click()

With Inet1
.URL = txtURLbox
.UserName = txtUID
.Password = txtPWD
.Execute , "GET " & txtServerPath & " " & txtLocalPath
End With

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