Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Connection TimeOut

SQL Connection TimeOut

Scheduled Pinned Locked Moved Database
databasesql-serversysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Johan Lombaard
    wrote on last edited by
    #1

    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

    P realJSOPR 2 Replies Last reply
    0
    • J Johan Lombaard

      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

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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.

      My blog | My articles

      1 Reply Last reply
      0
      • J Johan Lombaard

        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

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups