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. Connection Timeout

Connection Timeout

Scheduled Pinned Locked Moved Database
csharpdatabasetutorial
12 Posts 5 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.
  • M Offline
    M Offline
    megasoft house
    wrote on last edited by
    #1

    How to increase time of SQL connection timeout property in VB.NET

    W J 2 Replies Last reply
    0
    • M megasoft house

      How to increase time of SQL connection timeout property in VB.NET

      W Offline
      W Offline
      Wayne Gaylard
      wrote on last edited by
      #2

      You should use the SqlConnection.ConnectionTimeout property to adjust the timeout time of the connection. Here[^] is the MSDN page which gives some examples. Hope this helps

      When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

      1 Reply Last reply
      0
      • M megasoft house

        How to increase time of SQL connection timeout property in VB.NET

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        What is the physical nature of your network that makes you think that is necessary?

        M 1 Reply Last reply
        0
        • J jschell

          What is the physical nature of your network that makes you think that is necessary?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Why would the network have anything to do with the connection timeout requirements? If he is running a long stored proc then the timeout is relevant on the connection and the network latency is irrelevant.

          Never underestimate the power of human stupidity RAH

          D J 2 Replies Last reply
          0
          • M Mycroft Holmes

            Why would the network have anything to do with the connection timeout requirements? If he is running a long stored proc then the timeout is relevant on the connection and the network latency is irrelevant.

            Never underestimate the power of human stupidity RAH

            D Offline
            D Offline
            DaveAuld
            wrote on last edited by
            #5

            Is that not CommandTimeout?

            Dave Find Me On: Web|Facebook|Twitter|LinkedIn


            Folding Stats: Team CodeProject

            M 1 Reply Last reply
            0
            • D DaveAuld

              Is that not CommandTimeout?

              Dave Find Me On: Web|Facebook|Twitter|LinkedIn


              Folding Stats: Team CodeProject

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              I beleive there is a difference but would have to look it up, probably the command timeout is effective for the current command where a connection timeout is for all commands on the connection.

              Never underestimate the power of human stupidity RAH

              D 1 Reply Last reply
              0
              • M Mycroft Holmes

                I beleive there is a difference but would have to look it up, probably the command timeout is effective for the current command where a connection timeout is for all commands on the connection.

                Never underestimate the power of human stupidity RAH

                D Offline
                D Offline
                DaveAuld
                wrote on last edited by
                #7

                On the app I wrote for working with large datasets that can take over an hour to process certain fetch events, I have set my connection timeout to 5 seconds, and the command timeout to 0 (ie never timeout). works a treat.

                Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                Folding Stats: Team CodeProject

                M 1 Reply Last reply
                0
                • D DaveAuld

                  On the app I wrote for working with large datasets that can take over an hour to process certain fetch events, I have set my connection timeout to 5 seconds, and the command timeout to 0 (ie never timeout). works a treat.

                  Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                  Folding Stats: Team CodeProject

                  M Offline
                  M Offline
                  Mycroft Holmes
                  wrote on last edited by
                  #8

                  Sure but that has nothing to do with the network :-D

                  Never underestimate the power of human stupidity RAH

                  D 1 Reply Last reply
                  0
                  • M Mycroft Holmes

                    Sure but that has nothing to do with the network :-D

                    Never underestimate the power of human stupidity RAH

                    D Offline
                    D Offline
                    DaveAuld
                    wrote on last edited by
                    #9

                    Thats why you confused me with this;

                    Mycroft Holmes wrote:

                    If he is running a long stored proc then the timeout is relevant on the connection

                    The long running should be on the command, not the connection, or you should have said irrelevant on the connection. Anyway, doesn't matter, we'll leave it there, I need a cuppa...... :)

                    Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                    Folding Stats: Team CodeProject

                    1 Reply Last reply
                    0
                    • M Mycroft Holmes

                      Why would the network have anything to do with the connection timeout requirements? If he is running a long stored proc then the timeout is relevant on the connection and the network latency is irrelevant.

                      Never underestimate the power of human stupidity RAH

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #10

                      Mycroft Holmes wrote:

                      Why would the network have anything to do with the connection timeout requirements?

                      What other enterprise constraint would require changing it?

                      M 1 Reply Last reply
                      0
                      • J jschell

                        Mycroft Holmes wrote:

                        Why would the network have anything to do with the connection timeout requirements?

                        What other enterprise constraint would require changing it?

                        M Offline
                        M Offline
                        Mycroft Holmes
                        wrote on last edited by
                        #11

                        You seem to have taken a severe left turn, the OP was asking about how to change the connection timeout and you are now pursuing enterprise level network information. The guy may be working on a single user, personal application he is learning on (considering it is VB this is even more likely) and needs to cope with a long running stored procedure.

                        Never underestimate the power of human stupidity RAH

                        J 1 Reply Last reply
                        0
                        • M Mycroft Holmes

                          You seem to have taken a severe left turn, the OP was asking about how to change the connection timeout and you are now pursuing enterprise level network information. The guy may be working on a single user, personal application he is learning on (considering it is VB this is even more likely) and needs to cope with a long running stored procedure.

                          Never underestimate the power of human stupidity RAH

                          J Offline
                          J Offline
                          jschell
                          wrote on last edited by
                          #12

                          Mycroft Holmes wrote:

                          and needs to cope with a long running stored procedure.

                          And changing the connection timeout is going to impact that?

                          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