



Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dipankar BiswasRank #992 · 2K reputationPosted Oct 27, 2014, 10:35 PM EDT
private void button1_Click(object sender, EventArgs e)
{
con.Open();
SqlDataAdapter sd = new SqlDataAdapter("select * from customers where ......", con);
DataSet ds = new DataSet();
sd.Fill(ds, "customers");
dataGridView1.DataSource = ds.Tables[0];
con.Close();
}