|
In DotNet, there are two ways to access the database, read the data and generate a DataTable.
Take access to MS-SQL Server as an example:
One. Filling the DataTable with the Fill method in the SqlDataAdapter class
two. Use the SqlDataCommand class to generate an instance of the SqlDataReader class, then use the GetSchemaDTable method in the SqlDataReader class to return a DataTable
What's the difference between these two methods?
Which method performs better? |
|