Click here to Skip to main content
15,883,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi
i am writing c#.net ASP web application using sql server 2005. I need to know if i didn't close the connection string after open it .. what is the maximum number of computer can connect to db using that web application ...
Posted
Comments
shakil0304003 28-Jan-11 0:25am    
not clear!!!

If I understood properly, you are asking about number of connection that you are opening using conn.Open(). Well this is know as Conneciton Pooling. Which is Default in On.
whenever conn.Open(); executes, it will create a Connection Pool.
As a good coding practice and standards, you shuld always close the connection. Other wise, after certain period of time you will get error message like Error on maximum number of connections exceeded or connection pool has reached maximum number of connections. You can also configure connection pool limit in your config file as well.
But, as a good practice, always use proper connection open / close.
 
Share this answer
 
Why not just write your code properly so that this does not happen ?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Jan-11 23:42pm    
OP reply:

no just need to get knowledge

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900