Connectoon timeout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbsibms
    New Member
    • Oct 2009
    • 4

    Connectoon timeout

    I am not able to modify the connection timeout time using following connection string
    "Provider=SQLOL EDB.1;Persist Security Info=False;PWD= PWD;User ID=UID;Initial Catalog=DB;Data Source=serverna me;Connect Timeout=60"
    or
    "Provider=SQLOL EDB.1;Persist Security Info=False;PWD= PWD;User ID=UID;Initial Catalog=DB;Data Source=serverna me;Connect Timeout=10"

    in both the above cases the timeout happens in 30 seconds.
    can some one help
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    Hmm, I have no issue adjusting timeouts but I do it this way
    Code:
    cnn.Open("Provider=SQLOLEDB.1;Persist Security Info=False;PWD=PWD;User ID=UID;Initial Catalog=DB;Data Source=servername");
    cnn.CommandTimeout = 60;
    Have you done any research on what "ConnectTimeout " actually does?
    I have a feeling that it is a timeout for the actual connection creation only.
    Or is that what you are trying to do and I have totally missunderstood the question

    Comment

    • rbsibms
      New Member
      • Oct 2009
      • 4

      #3
      Thanks for msg
      The method pointed out by you is also not working I had tries that earlier.
      The ConnectTimeout is a property that forces any quarry run on the connection to timeout or terminate if the server does not respond in the given timeout parametere - in this cas 60 secs (for this particualar querry). When u re-send the querry the ConnectTimeout is resetted and times out this querry again if there is no response from server in 60secs.
      Regards

      Comment

      • rbsibms
        New Member
        • Oct 2009
        • 4

        #4
        I may be wrong about the defination I just posted. let me chek and post again

        Comment

        • rbsibms
          New Member
          • Oct 2009
          • 4

          #5
          you are right
          "ConnectTimeout " it is a timeout for the actual connection creation only.
          the command for querry timeout is
          cnn.CommandTime out = 60;
          This is working fine,
          Thanks it was only after ur msg that I could resolve it.

          Comment

          Working...