How to Dataset with Sql Server
The DataSet in ADO.NET contains a copy of the data that we retrieve from the data source using SQL statements. To populate the DataSet with data, we can use the SqlDataAdapter class, which acts as a bridge between the data source and the DataSet.
The SqlDataAdapter provides the Fill method, which is used to populate one or more DataTables within the DataSet. The Fill method takes as parameters the DataSet object and the name of the DataTable(s) to be filled. It retrieves the data from the data source using the specified SQL statement or stored procedure and fills the DataTable(s) in the DataSet with the retrieved data.
Here's an example of how to use the SqlDataAdapter and Fill method to populate a DataSet:Full Source VB.NET
Please note that the example above uses SQL Server as the data source, but you can also use other data providers and their corresponding classes, such as OleDbDataAdapter for OLE DB data sources, or OdbcDataAdapter for ODBC data sources, to populate a DataSet in a similar manner.