Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA RecordRefresh()
Message
From
08/04/2021 16:28:16
Walter Meester
HoogkarspelNetherlands
 
 
To
08/04/2021 16:08:48
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01679671
Message ID:
01679700
Views:
38
Sorry I did not answer the question.

>
>			ASQLHANDLES(aSqlhndls)
>			FOR EACH nOdbchdbc IN aSqlhndls
>				=SQLIDLEDISCONNECT(nOdbchdbc)
>			ENDFOR
>
>
>
>Nice trick. A few questions:
>
>1) Where do you put this- in a sqlexec() method or an object error method or ??

As explained in the previous message. Since I use the applic.SQLHandle parameter, it will probe the SQL connection before executing this command.

>2) Would sqldisconnect(0) suffice if you're closing them all?
I don't think so. I never tried.

>3) Do you ask the user whether to keep trying before you terminate the app?- J
Actually, when the application detects the connection is lost, it will throw up a wait window saying "The connection to the database is lost, trying to reconnect". The application becomes none responsive if the click the window and will eventually raise the question whether you still want to wait or quit the application.

I agree, it could be more graceful, but it is not a very common scenario as usually the lost connection is restored in seconds.

>
>Regards, J
Previous
Reply
Map
View

Click here to load this message in the networking platform