SQL Timeout issue

Posted on 2006-05-22
Last Modified: 2010-04-23
I have a stored procedure that I call from a application. It is an involved procedure that will take a few minutes to complete it. Whenever it runs after a few minutes I get an timeout error. I have adjusted the connect time in my connection string and that does not seem to help. Any ideas?
Question by:mwhodges
    LVL 11

    Assisted Solution

    Use the query wait option to specify the time in seconds (from 0 through 2147483647) that a query waits for resources before timing out.

    query wait is an advanced SQL option. If you are using the sp_configure system stored procedure to change the setting, you can change query wait only when show advanced options is set to 1. The setting takes effect immediately (without a server stop and restart).
    LVL 8

    Accepted Solution

    Also, if you're using a SqlCommand object to execute the stored procedure, set the Commandtimeout property of that object to a suitable amount of time.

    Author Comment

    I have tried to change the Connect Timeout=1000 in the sql connection to allow for a longer time witout any help. Is there a way I can manipulate the the timeout without making any permenant changes to the server?

    Author Comment

    I figured it out. I appreciate all your help. Here is the solution that I came up with
       cmdselect.CommandTimeout = 1000.
    Thanks for everything.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now