Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do you check connection on every call to SQL?
Message
From
10/03/2012 12:03:35
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01537347
Message ID:
01537930
Views:
42
>Note that generally you should *not* declare the IDisposable (in this case oDataAdapter) outside the using statement. If you do that it will remain in scope even though it has been disposed.

After millions of hits under that architecture, I did not get one single error or situation to report about that design. The data adapter is initialized highly in the chain because it is located in one central location and several lines of code are in and between. It would require a lot of adjustments in the design to have it included inside the Using/End Using. Did you get unexpected behavior when having it outside?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform