Inet Object for FTP Uploads

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a mdb which is currently about 55 mb in size. I have a function that
creates a copy of the mdb and uses the inet object to send that copy to a web
server.

This has worked well for a couple of years. An administrator user opens a
form clicks a button and uploads the file. Once or twice a week he updates
the web database.

Now the twist. Recently the web hosting service was changed. The server is
now a windows server instead of a unix server. Now, the function doesn't
work.

I am wondering if the "mode" is what is the issue and I want to test it. Is
there a way to set the mode to active or passive with the inet object?

Thanks in advance.
 
Thanks for the response Alex. The question is can I set that mode from the
client with the inet object? How do I set that property?

Thanks
 
Class Inet, Member of InetCtlsObjects
which is referenced by Microsoft Internet Trasfer Control 6.0 (SP4)
the ocx is msinet.ocx
 
Alex,
here is the function that I call:


----
Function UploadFile(ByVal HostName As String, _
ByVal UserName As String, _
ByVal Password As String, _
ByVal LocalFileName As String, _
ByVal RemoteFileName As String) As Boolean

Dim FTP As Inet

Set FTP = New Inet

With FTP
.Protocol = icFTP
.RemoteHost = HostName
.UserName = UserName
.Password = Password


.Execute .URL, "Put " + LocalFileName + " " + RemoteFileName

Do While .StillExecuting

DoEvents
Loop
UploadFile = (.ResponseCode = 0)
End With
Set FTP = Nothing

End Function

----
Worked fine until the server switched from Unix to Windows.

My understanding is they differ on how they assign ports to ftp calls, and
I'd like to be able to use this code without having to disable (essentially)
the firewall just for a simple ftp put statement.

Thanks.
 
Thanks Alex for the assistance. I will try to get this tested this evening.
I'll let you know of results.

Rich
 
Thanks Alex,
So far the tests worked ok through our firewall, hopefully it'll succeed on
the production machine!
 
Back
Top