Hi,
I'm writing a little application which uses inet.openURL to bring back a variable from a number of remote systems.
I've come across a strange issue where if it fails on connection to one of the systems, for the next system it attempts it doesn't seem to do anything at all?![]()
Here is some example code (I've also uploaded the demo app) where I have 5 different sites to connect to, sites 3 and 4 do not exist.
If you click on site1, it will bring back a result ok.
If you click on site3, it will bring back an error ok.
Now that we've had a failed connection, try clicking either a good or bad site - it does nothing?? It seems to take 2 attempts before it gets the next good or bad result.
I would really appreciate any help, I've been looking at this for a couple of days and can't see any reason why it's acting in this way.![]()
Code:Private Sub Form_Load() Inet1.RequestTimeout = 7 End Sub Private Sub cmd_check1_Click() On Error GoTo Check1Error: txt_result1.Text = Inet1.OpenURL(txt_string1.Text) Exit Sub Check1Error: txt_result1.Text = Err.Description End Sub Private Sub cmd_check2_Click() On Error GoTo Check2Error: txt_result2.Text = Inet1.OpenURL(txt_string2.Text) Exit Sub Check2Error: txt_result2.Text = Err.Description End Sub Private Sub cmd_check3_Click() On Error GoTo Check3Error: txt_result3.Text = Inet1.OpenURL(txt_string3.Text) Exit Sub Check3Error: txt_result3.Text = Err.Description End Sub Private Sub cmd_check4_Click() On Error GoTo Check4Error: txt_result4.Text = Inet1.OpenURL(txt_string4.Text) Exit Sub Check4Error: txt_result4.Text = Err.Description End Sub Private Sub cmd_check5_Click() On Error GoTo Check5Error: txt_result5.Text = Inet1.OpenURL(txt_string5.Text) Exit Sub Check5Error: txt_result5.Text = Err.Description End Sub




Reply With Quote