问题描述
When running a linq query, I get the following error:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I'm curious to know how I can view and modify this value to see if this just needs to be bigger or if there's something wrong with my query. My query has worked in the past, so I would like to think some timeout setting was changed since it was last working.
Thanks.
推荐答案
If you're using a Linq2Sql DataContext, it's available at YourDataContext.CommandTimeout.
For a SqlConnection, the CommandTimeout is a property of the SqlCommand object.
相关问答
相关标签/搜索