Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if a SQL Connection is Idle
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00624594
Message ID:
00624891
Views:
12
Kirk,

Have you looked at the IdleTimeout property of the connection? This might be your easiest solution. But you'll have to do some significant testing to make sure it isn't going to drop your connections out from under your app.

If you funnel all of your SQLExec() calls through a single entity (a UDF or the object that is holding your connection handle) then you can reset a countdown timer at every call. If the Timer() ever fires you can drop the connection. This might be problematic if you have server side cursors. I think this would prevent you from using remote views.

>I'm looking for a good way to timeout an applicaiton if there is no use for a given period of time. I use sql as the back end. at the begininng of the applicaiton I create a connection handle. I was wondering if sql maintains a connection status (idle and time idel) that I can query.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform