Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2003 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement