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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sqlconnection::open()

sqlconnection::open()

Scheduled Pinned Locked Moved Database
databasesysadminhelpquestion
5 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.
  • E Offline
    E Offline
    Eytukan
    wrote on last edited by
    #1

    Why SQL "blocks" when it cannot connect to a server? I would want it to return immediately on failure. Connection-timeout attribute looks like useless. I gave it as 5 seconds, but it continues to block for an eternity. Any help?

    He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

    V 1 Reply Last reply
    0
    • E Eytukan

      Why SQL "blocks" when it cannot connect to a server? I would want it to return immediately on failure. Connection-timeout attribute looks like useless. I gave it as 5 seconds, but it continues to block for an eternity. Any help?

      He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Please Explain in Detail what is your Problem

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za www.ITS.co.za

      E 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        Please Explain in Detail what is your Problem

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za www.ITS.co.za

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        I thought I explained enough. Anyway here I go: 1. There's an SQL server waiting for you to connect. It's address it 123.134.1.2. 2. Now your application connects, uses DB, finally closes connection. Fine. 3. Now server shuts down, restarts. It's IP is 123.134.2.3 (changed) 4. Your application tries to connect to the old address 123.134.1.2, which doesn't exist. Waits, Waits, Waits, Waits, Waits, Waits, Waits, Waits, Waits, 5. Throws a DB exception (May be wrong server/network error) I want to remove

        Waits,
        Waits,
        Waits,
        Waits,
        Waits,
        Waits,
        Waits,
        Waits,
        Waits,

        and want it to throw the error immediately.

        He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

        V 1 Reply Last reply
        0
        • E Eytukan

          I thought I explained enough. Anyway here I go: 1. There's an SQL server waiting for you to connect. It's address it 123.134.1.2. 2. Now your application connects, uses DB, finally closes connection. Fine. 3. Now server shuts down, restarts. It's IP is 123.134.2.3 (changed) 4. Your application tries to connect to the old address 123.134.1.2, which doesn't exist. Waits, Waits, Waits, Waits, Waits, Waits, Waits, Waits, Waits, 5. Throws a DB exception (May be wrong server/network error) I want to remove

          Waits,
          Waits,
          Waits,
          Waits,
          Waits,
          Waits,
          Waits,
          Waits,
          Waits,

          and want it to throw the error immediately.

          He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Why do you use an IP ? Because it changes, why dont you use its name ?

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za www.ITS.co.za

          S 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            Why do you use an IP ? Because it changes, why dont you use its name ?

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za www.ITS.co.za

            S Offline
            S Offline
            srinivasa rao dutta
            wrote on last edited by
            #5

            I think even using DB name is not a proper solution. What will happen if there is some error in DB Name? (http://www.improve.dk/blog/2008/03/10/controlling-sqlconnection-timeouts[^])This URL gives some good solution for this problem.

            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