Mid ADO.NET ADO.NET

Explain the use of the Fill method of the DataAdapter.?

The Fill() method of the DataAdapter is used to populate a DataSet or DataTable with data

from the database. It executes the SELECT query defined in the DataAdapter and fills the

specified DataSet or DataTable with the results.

Example:

SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM

Customers", connection);

DataSet dataset = new DataSet();

Follow:

adapter.Fill(dataset, "Customers"); // Fills the DataSet with data

from the "Customers" table

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details