In this example, we first create a SQL query and a connection string. We then use the SqlDataAdapter class to fill a DataSet with the data from the database. Example 2: Updating data in a DataSet and saving changes to the database.csharp using (SqlConnection connection = new SqlConnection(connectionString)) { SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Customers", connection); DataSet dataSet = new DataSet(); adapter.Fill(dataSet, "Customers"); // Modify data in the DataSet DataRow row = dataSet.Tables["Customers"].Rows[0]; row["CustomerName"] = "New Name"; // Update changes to the database SqlCommandBuilder builder = new SqlCommandBuilder(adapter); adapter.Update(dataSet, "Customers"); } ``` In this example, we first fill a DataSet with data from a database using an SqlDataAdapter. We then modify the data in the DataSet, before using a SqlCommandBuilder and SqlDataAdapter to update the changes to the database. Package library: System.Data.