Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Bakir Farooq   on Dec 10 In Asp.net Category.

  
Question Answered By: Tommy Thompson   on Dec 10

Try initialising "all the 2's" inside  the loop.

I know it seems like a waste of resources and it would be better to make things global but I have been told in the past that it is better practice to create and dispose of these as and when you need them, the overheads are minimal.

if you look at any daya layer which wraps up the functionality you will see that that is what is done, the connection  is created and destroyed every time the reader does anything at all.

Share: