private void Form1_Load(object sender, System.EventArgs e) { System.Data.SqlClient.SqlCommand mySqlCommand = sqlConnection1.CreateCommand(); mySqlCommand.CommandText = "SELECT CustomerID, CompanyName, Address " + "FROM Customers " + "WHERE CustomerID = 'ALFKI'"; System.Data.SqlClient.SqlDataAdapter mySqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter(); mySqlDataAdapter.SelectCommand = mySqlCommand; MyDataSet myDataSet = new MyDataSet(); sqlConnection1.Open(); mySqlDataAdapter.Fill(myDataSet, "Customers"); sqlConnection1.Close(); MyDataSet.CustomersDataTable myDataTable = myDataSet.Customers; foreach (MyDataSet.CustomersRow myDataRow in myDataTable.Rows) { listView1.Items.Add(myDataRow.CustomerID); listView1.Items.Add(myDataRow.CompanyName); listView1.Items.Add(myDataRow.Address); } }