I'm trying to teach myself the best practices approaches to programming, and in following the tutorials from ASP.net, I created a Data Access Layer which allows me to access my data via TableAdapters. However, being conscience of the need to limit the time that data connections are open and ensure they are the properly closed, I'm wondering if that is all done automatically by the TableAdapters as they are used. Does accessing data via TableAdapters dynamically open and close the connection to my database as needed (and hopefully, in an optimally efficient manner), or are the connections just opened up and remain open for as long as I have my web application open? Are there any advantages to handling the connection object manually, or is it better to just let the TableAdapters do the work? I know there were several questions in there, but I'm open to hearing people's opinions (hopefully informed opinions) on this. Thank you.
...
Go to the complete details ...