Hi,
AFAIK you need to set it on each Command object. One way to set it for all commands is to have a method that creates all commands: e.g:
SqlCommand GetSQLCommand(SqlConnection conn)
{
SqlCommand com = conn.CreateCommand();
com.CommandTimeout = GetTimeoutValueFromWebConfig();
return com;
}
>Thanks for your reply. Where would I place the query timeout setting. I would like to have it affect all pages in the web application.
>Is it in the web.config file?
>
>Thanks in advance.
>
>Bob
>
>>Time waiting for a connection is controlled by ConnectionTimeout setting in the connection string.
>>Time waiting for a query is controlled by DbCommand.CommandTimeout
>>HTH,
>>Viv