using (SqlConnection connection = new SqlConnection(@"server=.;database=gr;user id=sa;pwd=")) { //SqlDataAdapter sda = new SqlDataAdapter("select * from customers", connection); //DataSet ds = new D ataSet(); //sda.Fill(ds); BindingSource bindingSou
开始以前,先认识一下WinForm控件数据绑定的两种形式,简单数据绑定和复杂数据绑定。
1. 简单的数据绑定
例1
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[connStr].ToString()))
{
SqlDataAdapter sda = new SqlDataAdapter(Select * From T_Class Where F_Type='Pr