if you ever thought how can you make those programers close connections to the DB here is a solution
as i read in Bertrand Le Roy’s technical blog there is a way to call dispose on an object right when you go out of scope.
well as you probably can read in Bertrand Le Roy’s technical blog he explains the theory behind his mindset of opening late and closing early.
Though i dont totally agree for the usage of dataset and datareader there is a point for his point of view.
If you keep the programers in the right path the abusage of the database connections is on his way for extinction.
here is the MSDN entry for the using() statment.

Hey I found some more stuff on the using() and Garbage Collection Examples.

Speak Your Mind


This site uses Akismet to reduce spam. Learn how your comment data is processed.