SQL Connection TimeOut
-
We have a VB6 app that uses ADO to connect to SQL Server. When the client leaves it running on her notebook (without any activity) for about an hour, the app freezes. I suppose it's due to the SQL connection timing out due to inactivity. Has anyone seen this ?
Johan Lombaard Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein
-
We have a VB6 app that uses ADO to connect to SQL Server. When the client leaves it running on her notebook (without any activity) for about an hour, the app freezes. I suppose it's due to the SQL connection timing out due to inactivity. Has anyone seen this ?
Johan Lombaard Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein
Johan Lombaard wrote:
Has anyone seen this ?
Nope. If the connection times out, the app would probably crash on an attempt to get to the database the next time.
Deja View - the feeling that you've seen this post before.
-
We have a VB6 app that uses ADO to connect to SQL Server. When the client leaves it running on her notebook (without any activity) for about an hour, the app freezes. I suppose it's due to the SQL connection timing out due to inactivity. Has anyone seen this ?
Johan Lombaard Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein
First, the database connection should only be opened long enough to perform a query, and then shut down immediately afterwards. Second, a sql connection should not close itself after a certain amount of inactivity (the calling app should always be in control). If it DOES shut itself down, and as a result causes your app to crash, it's your app's fault. Second, "I suppose" is not acceptable. Run it through a debugger and find out why it's happening. If you have to, make it write a log file and just let it run until it freezes. At that point, you'll probably be able to at least narrow the problem down. Not using the tools you have before asking that question is inappropriate.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001