Last post Mar 09, 2011 03:44 PM by WombatEd
Mar 08, 2011 10:17 AM|HennMIS|LINK
style="font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 1em; margin-right: 2em; margin-bottom: 0em; margin-left: 4.5em; outline-width: 0px; outline-style: initial; outline-color: initial; padding: 0px; border: 0px initial initial;"
class="container"> <div style="font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 2em; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; overflow-x: visible;
overflow-y: visible; clear: right; font-size: 1em; padding: 0px; border: 0px initial initial;" class="body">
I have seen MANY threads on this topic, but still can not find a definitive answer as to how to fix this.
I am using VB.Net
1) I have a DAL(we will call it dal.xsd) made up of a TableAdapter (we will call it getsomething)
2) The getsomething TableAdapter has a query which calls a stored procedure (we will call it sp_getsomething)
3) I have a webpage(getsomething.aspx) which has a GridView(gdvGetSomething) whos data source is an ObjectDataSource(ObjectDataSource1), which calls the sp_getsomething stored procedure from the getsomething TableAdapter
PROBLEM: The execution of the stored procedure takes longer than the default command timeout of 30 seconds
Question: How and/or where can I raise the Command Timeout value so that I dont get the System.Data.SqlClient.SqlException:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I have read several things about creating a partial class, and if this is the case, then where do I put that at? Do I have to create a new class file? does it go in the getsomething.vb? Is there an entry I can put in the web.config?
Any help would be greatly appreciated. Thanks!
Mar 09, 2011 03:44 PM|WombatEd|LINK
When I get SQL timeouts, it's usually because I've done something wrong other than setting my timeout value too low, e.g. created a bottleneck or a deadlock somewhere. (My favorite was when I created a trigger that put SQL into an infinite loop. ;-)
Have you run the same query using the SQL Server admin tool?