Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reconnect a remote view to SQL server.
Message
De
06/07/2006 09:43:02
Walter Meester
HoogkarspelPays-Bas
 
 
À
05/07/2006 05:24:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01133536
Message ID:
01134125
Vues:
42
Hi aleksey,

I'm not sure I understand this.

My application uses a shared connection made by SQLSTRINGCONNECT(). All remote views and SPT are using this connection.

After I detect the connection has been broken I do a SQLIDLEDISCONNECT(Applic.SQLhandle) to close the connection. This sometimes works, but in other cases it does not.

If I get the connectionhandle via CURSORGETPROP("Connectionhandle", Myview) and use that handle in SQLIDLEDISCONNECT(), the function is returning -1. Even using 0 as a parameter returns -1.

The ODBChdbc and ODBChstmt do still contain numbers (are not set to 0).

The problem as I see it is that I have to detect the disconnect before I try to requery() it. Once I don't do that, SQLIDLEDISCONNECT() does not reconnect the disconnected view.

Can you confirm this problem ?

Walter,









>>but in a test I already tried that. Sometimes success, sometimes it just does not work: The view won't reconnect.
>>
>
>Hi Walter,
>
>This may happen with shared connection. If ODBC connection is shared between multiple SPT connections, SQLIDLEDISCONNECT() must be called for all of them, ODBChdbc property should return 0 in order to automatically reestablish "broken" connection.
>
>Thanks,
>Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform