Quantcast
Viewing all articles
Browse latest Browse all 21197

Server Not Responding Issue

I'm getting data from a Server over which I have no control.
Sometimes it does not respond and the code I'm using causes the App to freeze.
Only thing I can think of maybe setting a timer in my program such that if a certain period of time expires
I exit my Sub that called the Server.

UPDATE: Changed to Timer and dropped Sleep (forgot it suspends execution)

Still looking for better alternative.

Code:

          'Wait Until Server Returns Records
            'or Kill if Error
            Do
              If (mstrGotRecords = "error") Then
                  frmHD.Caption = "ERROR - Check and Redo Request"
                  Exit Sub
              Else
                  If (mstrGotRecords = "fin") Then
                      Exit Do
                  Else
                      Call fWait(3)      'API function
'>>>
                  End If
              End If
            Loop

Any other solution appreciated.

Viewing all articles
Browse latest Browse all 21197

Trending Articles



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