Not sure if this will help, but how about something like...
nHandle = Connect2AS400()
IF EMPTY(nHandle) OR nHandle < = 0
MESSAGEBOX('Connection cancelled by user')
RETURN
ENDIF
PROC Connect2AS400
LOCAL lnHandle
DO WHILE lnHandle < = 0
lnHandle = SQLStringConnect(cConnectString)
IF lnHandle < = 0
WAIT WINDOW 'AS400 busy. Wait to re-try or ESC to cancel' TIMEOUT 1
WAIT CLEAR
IF LASTKEY()=27
EXIT
ENDIF
ENDIF
ENDDO
RETURN(lnHandle)
HTH
>I am having trouble with my VPF 6.0 app. I have code that connects to our AS400 system with a SQLStringConnect(). Sometimes the AS400 is too busy busy to connect to. When this happens I get a dialog pop-up that says something like log on for user in progress. 9 out of 10 times this dialog pop-up never completes and the app has to be ended and started over. Is there any way to trap for this? The ODBC actually uses the Client Access of the AS400 system.