Steps to fill the dataset. 1.Create a connection object. 2.Create an adapter by passing the string query and the connection object as parameter. 3.Create new object of dataset. 4.Call the fill method of the adapter and pass the data objects.