Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: FTPOpen
FtpOpen sometimes hangs. We have another extender, the WinInet Extender, which is a complete new replacement Internet extender. It seems to run a lot better, but of course is completely incompatible with existing code (although it should not be that difficult to change).
The best workaround it seems so far is simply to wxPing the ftp site right before the ftpOpen, to see if it responds to the ping before attempting the open. This greatly reduces the frequency of hanging.
A user also reported to us that they were having problems with FTPOpen hanging, but when they deleted Dial-up Networking and reinstalled Dial-up Networking, FTPOpen started working.
When I pop the return code from FTPOPEN into a message box to look at it, I got a message from the FTPOPEN statement saying that there was a 999 error, server not found. For the Host, I had put the actual name of the host machine. When I substituted the IP address of the host, the error went away. I would rather use the host name of the machine in case the IP address changes (which I was informed may occur). What could be causing the problem? Is there some parameter that has to be changed in Win95?
Basically we get the host name, then ask windows to translate it into an IP address by asking your defined DNS server. If your DNS server is down - nogo. If you do not have a defined DNS server - nogo (but then your web browser and ftp would need ip addresses only too - I don;t think thsi is the case)
Possible typo in host name?
If you post the line of code with the host name in it instead of the IP address, we can look at it and check the DNS resolution information.
Control Panel ->Network Applet ->TCP/IP (possibly pointing to a network card) ->Properties ->DNSSee that IP address is configured for the DNS server and if DNS (or LMHOSTS) is enabled.
If DNS, locate DNS machine the bad PCs are pointing to and consult with administrator. DNS Tables need updating (Should be auotmatic but...).
If LMHOSTS, then the LMHOSTS file in your Windows (maybe \Windows\system) directory is out of date.
Test for the 999 error with the Lasterror function:
retcode = FTPOpen(...) if retcode == 0 errcode=LastError() if errcode == 999 then run("Winbatch.exe", "myscript.wbt") ; How to kill another WinBatch program hwnd = DllHwnd("The WinBatch window title") IntControl(23, hwnd, 1111, 1332, 0)
Article ID: W12642
Filename: 999 Error on FTPOpen.txt
File Created: 1999:04:15:16:48:38
Last Updated: 1999:04:15:16:48:38