This topic is locked

SQL 2005 timeout

9/4/2007 8:51:44 PM
ASPRunner.NET General questions
F
fmbma author

I'm having a problem with a complex query timing out before a list view is generated. If the SQLCommand object is created in vb, I know there is a SQLCommand.commandtimeout parameter that can be set. In the code generated by asprunner.net, the sql datasource is defined in the aspx. Is there a way to set the commandtimeout or an equivalent?

Thanks

Eugene 9/5/2007

Try to create event OnSelecting="SqlDataSource_SetTimeout" at SQLDataSource.
You should set up timeout in event:
protected void SqlDataSource_SetTimeout(object sender, SqlDataSourceSelectingEventArgs e)

{

e.Command.CommandTimeout = 600;

}