Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
As400 Client Access
Message
From
06/02/2004 17:20:20
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
30/01/2004 08:35:47
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00872261
Message ID:
00875034
Views:
14
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.
L.A.Long
ProgRes
lalong1@charter.net
Previous
Reply
Map
View

Click here to load this message in the networking platform