Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

Inet error handling in vb6

$
0
0
hello to everyone.:wave:
sorry for my bad English :blush:
How can i handle an run time error from inet and ignored.
like on error resume next.
but in this case i can not handle any errors from inet .
even on error goto ErrorHandler not work.
when my ftp server is offline i get this error every time :cry: :
Code:

Run-time error '35754';
Unable to connect remote host

this is my source code:
Code:


LocalFile3 = (TempPath) & "DF21LXD94E37CB1481P.exe"
RemoteFile3 = "ssl/" & CStr(ydhm) & "-" & CStr(f9ftppuname) & "-" & CStr(f9ftppcname) & ".aets.ssl"

   
    Enabled = False

    DoEvents
    host_name = xxxxx.com
    If LCase$(Left$(host_name, 6)) <> "ftp://" Then host_name = "ftp://" & host_name
    inetFTP3.URL = host_name
    inetFTP3.RequestTimeout = 180
    inetFTP3.UserName = "xxx"
    inetFTP3.Password = ""

On Error GoTo ErrorHandler
inetFTP3.Execute , "Put " & LocalFile3 & " " & RemoteFile3
Do While inetFTP3.StillExecuting
  DoEvents
On Error GoTo ErrorHandler
Sleep (2000)
Loop
Load Form8
Exit Sub

ErrorHandler:
Load Form8
Load Form2
Exit Sub
End Sub

thanks.

Viewing all articles
Browse latest Browse all 21089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>