Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote Views and Dropped Connection
Message
From
07/04/2015 15:40:14
 
 
To
02/04/2015 02:41:19
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01617671
Message ID:
01617969
Views:
31
>>I have not used remote views probably since the mid 90's and am struggling on how to handle this problem. The framework I use has remote views for certain standard system tables (like the Users table) but allows me to access all my specific tables using SPT.
>>
>>I am having an issue when running my application on a Windows tablet where the connection to the database gets lost or dropped when the tablet goes into sleep mode.
>>
>>I have adjusted my SPT so that if a dropped connection is detected I retry a few times to re-connect to the database. However, I cannot work out how to do this for the remote views.
>>
>>Any ideas?
>
>You can use the following code if you found the connection has dropped (VFP9 only)
>
>
ASQLHANDLES(aSqlhndls)
>FOR EACH nOdbchdbc IN aSqlhndls
>	=SQLIDLEDISCONNECT(nOdbchdbc)
>ENDFOR
>
>This will cause the connectionhandle to reconnect to the database as soon as any activity is set on the same connection handle (Both remote views and SPT).
>
>Walter,

Walter,

I have tried that code in my application's timer but it did not make any difference. If I have views that are already opened, when they requery() I still get the connection handle error. Any ideas what I may be doing wrong?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform