DataTable in ADO.Net

DataSet is a collection of many tables where as DataTable is an object to represent a single table in DataSet. A DataTable represents one table of in-memory relational data; the data is local to the .NET-based application in which it resides, but can be populated from a data source such as Microsoft SQL Server using a DataAdapter. You can create and use a DataTable independently or as a member of a DataSet, and DataTable objects can also be used in conjunction with other .NET Framework objects, including the DataView. You access the collection of tables in a DataSet through the Tables property of the DataSet object.

DataTable can be creating with help of following code:

DataTable dt = new DataTable (“Data Table Name”);

Last updated:9/18/2014 1:23:57 PM
Arun Singh

Arun Singh

Software Developer


Leave Comment