Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1569 connectés 

  FORUM HardWare.fr
  Programmation

  [SQL/Server] Augmenter valeur du timeout

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[SQL/Server] Augmenter valeur du timeout

n°99815
AirBg
The Philosopher
Posté le 13-02-2002 à 11:42:14  profilanswer
 

'jour tlm
 
j'ai une vue assez lourde et quand je fais une requète simple dessus (à partir de page ASP) j'ai un timeout expired.
Comment je pourrais augmenter la valeur de ce timeout ?
 
je suis dans la mouise la, si qq pouvait m'aider :)
 
 
merci d'avance


---------------
"There's not such a thing as a stupid question, only stupid people..."
mood
Publicité
Posté le 13-02-2002 à 11:42:14  profilanswer
 

n°99837
thegti
La constipation se soigne ...
Posté le 13-02-2002 à 12:16:05  profilanswer
 

ca dépend de ta méthode d'accès à la base et de l'objet que tu utilise
pour ADO, y'a connection.timeout, command.timeout

n°99845
AirBg
The Philosopher
Posté le 13-02-2002 à 12:34:04  profilanswer
 

voilà un bout de code vbscript pour les méthodes d'accès :
 
Set oConn=Server.CreateObject("ADODB.Connection" )
 oConn.Provider = "SQLOLEDB"
 oConn.Properties("Data Source" ).Value = "xxx"
 oConn.Properties("Initial Catalog" ).Value = "xxx"
 oConn.Properties("User ID" ).Value = "xxx"
 oConn.Properties("Password" ).Value = "xxx"
 oConn.open
 
  Set oRs=Server.createObject("adodb.recordset" )
  strSQL="select * from V_High_End_Flag_By_Product3"
  if len(trim(strCleId))>0 then
   strSQL=strSQL & " where cle_id='" & strCleId & "'"
  else
   if len(trim(strOtherName))>0 then
    strSQL=strSQL & " where Delivery_name='" & replace(strOtherName,"'","''" ) & "' "
   end if
  end if
  strSQL=strSQL & " order by nom"
  oRs.open strSQl, oConn,,adCmdText
 
c'est à cette dernière ligne que le timeout expire, donc c'est la requète qui est trop lourde (vue)


---------------
"There's not such a thing as a stupid question, only stupid people..."
n°99878
AirBg
The Philosopher
Posté le 13-02-2002 à 13:46:49  profilanswer
 

connection.timeout et command.timeout n'ont pas l'air de marcher :(


---------------
"There's not such a thing as a stupid question, only stupid people..."
n°99883
AirBg
The Philosopher
Posté le 13-02-2002 à 13:54:19  profilanswer
 

ca marche pardon !!!
je suis une tata qui cherche pas :(
 
voilà la solution si un pb du genre arrive à vous autres
 
Set oConn=Server.CreateObject("ADODB.Connection" )
oConn.CommandTimeout = 10 * 60


---------------
"There's not such a thing as a stupid question, only stupid people..."
n°99943
thegti
La constipation se soigne ...
Posté le 13-02-2002 à 15:43:59  profilanswer
 

airbg a écrit a écrit :

ca marche pardon !!!
je suis une tata qui cherche pas :(
 
voilà la solution si un pb du genre arrive à vous autres
 
Set oConn=Server.CreateObject("ADODB.Connection" )
oConn.CommandTimeout = 10 * 60  




 
c'est ca ouais
tu peut même mettre
oConn.CommandTimeout = 600
ca allégera la charge du serveur :D


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  [SQL/Server] Augmenter valeur du timeout

 

Sujets relatifs
[PHP + SQL] Gestion des mots de passe crypté[PHP + SQL] explications + code inside (requete SQL)
[SQL] Mise à Jour de Tables[SQL] Manipuler un fichier .txt ou .doc
[SQL] problème avec le IN[SQL SERVER] Faire des arrondis en transac sql ???
Récupérer une valeur dans un chaine sql[JAVA + SQL] Nb de lignes dans un resultSet
Help ! Un truc vraiment facile en PL/SQL avec TOAD !!! 
Plus de sujets relatifs à : [SQL/Server] Augmenter valeur du timeout


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR