home · blog · groups · about us · contact us
DevelopmentNow Blog
 Thursday, May 04, 2006
 
 

I was dealing with an ASP.NET SqlDataSource query that kept timing out, which was annoying because I was trying to run my application through the Database Tuning Advisor (a SQL Server 2005 tool that analyzes trace logs and recommends indexes). The timeouts were preventing me from getting through my whole test case, though.

So, I found a quick solution to setting the timeout value for a SqlDataSource: add a Selecting event handler and put

protected void mySqlDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
e.Command.Command = 300; // 5 min timeout
}

Easy peasy. :)

May 4, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]

Related posts:
SubSonic DAL layers in Visual Studio
Intro to BDD
Easy FTP Uploads in your EXEs
FireBug 1.0.1 is out
WYSIWYG editor in minutes
jQuery for javascript effects


« Edit and Continue in Visual Studio 2005:... | Main | SQL Server 2005 Database Tuning Advisor »
Comments are closed.