How to Asp.Net Dataset
A DataSet contains rows, columns,primary keys, constraints, and relations with other DataTable objects. The DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source.
We can use Dataset in combination with SqlDataAdapter Class . Build and fill each DataTable in a DataSet with data from a data source using a DataAdapter. The SqlDataAdapter object allows us to populate Data Tables in a DataSet.vb.net
Dim adapter As New SqlDataAdapter(sql, connection)
SqlDataAdapter adapter = new SqlDataAdapter(sql,connection );
The following ASP.NET program retrieve publishers name from publisher table using a Dataset.
Click the following links to see full source code