Dr.Wing

心翼的技术笔记本

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
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";

 

posted on 2010-09-09 16:29  心翼  阅读(16626)  评论(1编辑  收藏  举报