all groups > sql server connect > august 2004 >
You're in the

sql server connect

group:

SQLConnect app locks up when SQL not available.



SQLConnect app locks up when SQL not available. Don
8/25/2004 2:28:05 PM
sql server connect: SQL 7.0/NT 4.0

We have a C++ application using an ODBC call "SQLConnect"
to a SQL server which works just fine unless there's a
problem, e.g., SQL server goes down or something similar
that breaks the connection.

Then the C++ application locks up as it retries to
connect in a sort of infinite loop.

Is there a way for the SQLConnect to try to connect for a
few seconds, then suspend that action for 15 secs, and
then retry. Or something. Because right now the
application has to be shutdown to gain control and point
it to a working SQL server.

thanks,
Don
RE: SQLConnect app locks up when SQL not available. kevmc NO[at]SPAM online.microsoft.com
8/27/2004 12:10:21 AM
What about just shortening the LoginTimeout value in the ODBC or OLEdb api?
Also, depending on the protocols being used a network connection or session
is established first prior to sending the loginpacket. This session is
controlled by the network stack not SQL.

Thanks,

Kevin McDonnell
Microsoft Corporation

This posting is provided AS IS with no warranties, and confers no rights.


AddThis Social Bookmark Button