I'm basically trying to query an FTP server, pull down a particular file,
do a quick filetostr(), make some changes, strtofile(), and then back up to
the FTP server. Sound simple, but it's driving me nuts.
I'm using Robert Abram's FTP class and my code is as follows:
Set Procedure To ftp.prg Additive
*** define user/pass for FTP (It all comes back correctly)
ftpusername = ALLTRIM(accountdata.username) &&char
ftppass = ALLTRIM(accountdata.pass) &&char
ftpdomainaddresse = ALLTRIM(accountdata.url) &&char
ftpport = 21 &&numeric
*** Connect to FTP
obj_download_ftp = createobject('ftp_service')
lconnected = obj_download_ftp.OpenInternet(ftpusername, ftppass,
ftpdomainaddresse, ftpport)
***gimme an error.... any error.
? "openinternet has returned: "
? lconnected
? "error code: "
obj_download_ftp.GetExtendedErrorCode()
? obj_download_ftp.GetExtendedErrorCode()
MESSAGEBOX(obj_download_ftp.GetExtendedErrorCode(), 48,
"error?...")
IF lconnected = .T.
&&connected!
ELSE
MESSAGEBOX("Oh No! Couldn't connect ot FTP server.",48,"FTP
Server took a dive.")
ENDIF
If you'll forgive my rather frivolous comments, and look past the many ?
lines (there were a lot more attempts at getting some form of feedback, but
I've eiter abandoned those or left them out of the example code), perhaps
one of you fine people will spot what I'm doing wrong, but it sure isn't
connecting to the FTP server. I keep TCPView open to see if it's even
trying, and it doesn't even register a blip. i've even copied wininet.dll
to the exe file's directory in an effort to make sure that it's finding
everything it says it needs.
Cheers!
-Duffy
I'm not familiar with that class, but they're all pretty much the same:
wrappers around WinInet API calls.
Standard troubleshooting applies. Can you connect to that FTP server using a
stand-alone FTP client and the same credentials your code is using? How
about the command line FTP utility? Do you have a firewall or proxy server
getting in the way?
Dan
I wonder if I shouldn't just try to call the wininet.dll myself, although,
that might be a pain, it might be a little bit better not having to go
through a wrapper. But oh, what a pain. heh.
"Dan Freeman" <sp...@microsoft.com> wrote in news:#C5p5AoHFHA.3040
@TK2MSFTNGP10.phx.gbl:
Try changing active / passive ftp mode in IE options.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
Rick
"Liska Station" <msnewsJU...@DuffyWeber.com> wrote in message news:Xns960D78C8A9A...@207.46.248.16...
-Duffy
"Rick Bean" <rgb...@unrealmelange-inc.com> wrote in news:uxnz$r1HFHA.896
@TK2MSFTNGP10.phx.gbl: