Walter Meester
HoogkarspelNetherlands
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only