public partial class Form1 : Form
// Part 1: open connection.using (SqlConnection c = new SqlConnection(
// Part 2: create new DataAdapter.using (SqlDataAdapter a = new SqlDataAdapter(
"SELECT * FROM EmployeeIDs", c))
// Part 3: Use DataAdapter to fill DataTable.
DataTable t = new DataTable();
// Part 4: render data onto the screen.
// dataGridView1.DataSource = t;
Fill. Fill is the most important method on the DataAdapter objects. It executes the query and fills the DataAdapter object with the results.
OnFillError This is an event that allows you to listen to when an error occurred when filling the DataTable.
GetFillParameters This allows you to get the parameters that are being used in a SELECT statement.
Options. LoadOption is an enumeration of the options you can use when the DataAdapter is loaded. You can specify OverwriteChanges, PreserveChanges and Upsert.
AcceptChangesDuringUpdate You code can use the AcceptChanges method when you want to accept all changes made to the row.
OnRowUpdated, OnRowUpdating. These events allow you to receive messages when the specified actions occur. They are useful when you must be alerted to changes.
SqlCommandBuilder. SqlDataAdapater can push even more of the error-prone coding into the ADO.NET methods when you also use SqlCommandBuilder.