SqlConnection myconnection=new SqlConnetion(Connectionstring);//数据连结
SqlDataAdapter ad=new ("SELECT DISTINCT areaname,softuser FROM queryclient",myconnection);//数据适配器
DataSet ds=new DataSet();//数据池
ad.Fill(ds,"queryclient");//填充数据池
//绑定数据到comboBox
comboBox1.DataSource=ds.Tables["queryclient"];
comboBox1.displyMember="areaname";
SqlDataAdapter ad=new ("SELECT DISTINCT areaname,softuser FROM queryclient",myconnection);//数据适配器
DataSet ds=new DataSet();//数据池
ad.Fill(ds,"queryclient");//填充数据池
//绑定数据到comboBox
comboBox1.DataSource=ds.Tables["queryclient"];
comboBox1.displyMember="areaname";
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货