Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database session timeout setting
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01335327
Message ID:
01335581
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform