I have been wondering this and can’t really find a straight answer. In .NET when you fill a DataTable with rows from the database using the SQL Server data adapter does it truly load into memory right then and there or does it still read data from the database as you are accessing it in some regard?
Share
You can close the connection after filling the DataTable. It does not need to access the database anymore after filling. The DataReader requires an open connection as it is being used.