FTP

  • Thread starter Thread starter Gargamil
  • Start date Start date
G

Gargamil

Can anyone tell me how to FTP to and from a site using MS Access?? I've
tried Dev Ashish's code but can't get it working with 2003. What am I
missing?

g
 
If you are using the same code as I, I had to change the following in Public
Sub ConnectToFTPHost( _
....
If Not mblnUpload Then
With mtURLInfo

Rem This line below was added - the apiFTPFileOpen command did not
like the "/" in
Rem front of the path The line below strips the foward slash ..
If Mid(.lpszUrlPath, 1, 1) = "/" Then .lpszUrlPath = Mid(.lpszUrlPath,
2)

hFTP = apiFtpOpenFile(hSession, .lpszUrlPath, _
lngFileMode, FTP_TRANSFER_TYPE_BINARY Or _
INTERNET_FLAG_DONT_CACHE, 0&)

If hFTP = 0 Then Err.Raise mconERR_CANNOT_START_TRANSFER

lngRet = apiInetQueryDataAvailable(hFTP, mlngSize, 0&, 0&)
If mlngSize = 0 Then mlngSize = 1
End With
End If
....
Hope this helps...


Jim Wood

______________________________________________________________________________________________

The Closest Christian Bookstore Is Only A Click Away

http://www.KathysChristianBooks.com

______________________________________________________________________________________________

Offer not valid in Rome or Salem. Fiddling prohibited by law. Being turned
into a newt also prohibited by law.



________________________________________________________________________________
 
Back
Top