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";

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案