private void Form2_Load(object sender, EventArgs e) { PName.Text = "Select-an-option"; Qty.Clear(); Rate.Clear(); SqlDataAdapter da = new SqlDataAdapter("select Product_Name from Add_Product ", con); DataSet ds = new DataSet(); da.Fill(ds, "login"); int index = 0; for (index = 0; index < ds.Tables[0].Rows.Count; index++) { PName.Items.Add(ds.Tables[0].Rows[index][0]); } }