Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Database session timeout setting
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01335327
Message ID:
01335581
Vues:
20
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform