C#:如何将SQL的数据显示在comboBox
SqlConnection Conn=.... //初始化,comboBox1绑定客户表 string Sql= "select customerName from customer"; DataSet Ds= new DataSet(); SqlDataAdapter Da= new SqlDataAdapter(Sql, Conn); Da.Fill(Ds, "customer"); comboBox1.DataSource = Ds.Tables["customer"]; comboBox1.DisplayMember = "customerName";
来自:http://www.cnblogs.com/52yixin/articles/1822433.html