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.
Any other solution appreciated.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




Reply With Quote