We use RecordSet objects as tables with ADO. Each RecordSet object corresponds to a database table. With Datasets, a similar function is handled by the DataTable object. A DataTable object is like a database table. It belongs to the datatables collection of the DataSet. If the DataSet contains data from multiple tables, one DataTable corresponds to one table or view. This way, the DataSet can mimic the structure of its underlying database. When we say that the DataSet is a container for data, we must keep in mind that the data is actually contained in the DataTable objects. In other words, a DataTable is an in memory cache of the data from one table. A DataTable can be instantiated just like any other object in VB.NET with the "New" keyword. |