• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

SQL Timeout issue

I have a stored procedure that I call from a vb.net 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?
  • 2
2 Solutions
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).
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.
mwhodgesAuthor Commented:
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?
mwhodgesAuthor Commented:
I figured it out. I appreciate all your help. Here is the solution that I came up with
   cmdselect.CommandTimeout = 1000.
Thanks for everything.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now