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

  FORUM HardWare.fr
  Programmation
  C#/.NET managed

  [ASP.Net] Connection Pooling ???

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[ASP.Net] Connection Pooling ???

n°758380
zetoune
Posté le 09-06-2004 à 19:51:44  profilanswer
 

Avec le Connection Pooling activé :
 
J'ai lu que je devais fermer la connexion dès que je m'en servais pas  
 

Take full advantage of connection pooling. To get the most out of connection pooling in ADO.NET, keep the following in mind when developing your ASP.NET applications:
 
Be sure than your connections use the same connection string each time. Connection pooling only works if the connection string is the same. If the connection string is different, then a new connection will be opened, and connection pooling won't be used.
 
   
[g]Only open a connection when you need it, not before.[/g]
 
   
Close your connection as soon as you are done using it.
 
   
Don't leave a connection open if it is not being used.
 
   
Be sure to drop any temporary objects before closing a connection.
 
   
Be sure to close any user-defined transactions before closing a connection.
 
   
Don't use application roles if you want to take advantage of connection pooling.  
[7.0, 2000] Updated 1-2-2004


 
Dois je ouvrir et fermer ma connexion à la base de donnée à chaque fois que je fais une requête même dans la même page?  
 
conn.open()
oreader = ocomm.executereader
ocomm.dispose
oreader.close
oreader.dispose
conn.close()
 
conn.open()
oreader2 = ocomm.executereader2
ocomm.dispose
oreader2.close
oreader2.dispose
conn.close()
 
conn.open()
oreader3 = ocomm.executereader3
ocomm.dispose
oreader3.close
oreader3.dispose
conn.close()
 
 
Ou je fais ça ?  
 
conn.open()
 
oreader = ocomm.executereader
ocomm.dispose
oreader.close
oreader.dispose
 
oreader2 = ocomm.executereader2
ocomm.dispose
oreader2.close
oreader2.dispose
 
oreader3 = ocomm.executereader3
ocomm.dispose
oreader3.close
oreader3.dispose
 
conn.close()
 

mood
Publicité
Posté le 09-06-2004 à 19:51:44  profilanswer
 

n°758486
zetoune
Posté le 09-06-2004 à 22:21:06  profilanswer
 

Help !! C'est assez urgent !


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C#/.NET managed

  [ASP.Net] Connection Pooling ???

 

Sujets relatifs
[shell-Linux] Connection à un serveur ftp [resolu][ASP] Conversion string en décimal ?
ASP et Base de données Access avec Front Pageaide ASP pour un débutant. [Résolu]
[VC++ .Net] Ajouter une option "nouveau projet QT"[ASP] imbrication de while et menu déroulant
[ASP] [formulaire] comment ajouter/supprimer des champs!Urgent! Problème ASP lors passage IIS 4.0 --> 5.0
fonction Javascript dans une page asp 
Plus de sujets relatifs à : [ASP.Net] Connection Pooling ???


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