源错误:
行 20: SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["sjk"]);
行 21: SqlDataAdapter sda = new SqlDataAdapter();
行 22: con.Open();
行 23: sda.SelectCommand = new SqlCommand("select name from tezheng", con);
行 24: DataSet ds = new DataSet();
文件源码:
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["sjk"]);
SqlDataAdapter sda = new SqlDataAdapter();
con.Open();
sda.SelectCommand = new SqlCommand("select name from tezheng", con);
DataSet ds = new DataSet();
sda.Fill(ds, "tz");
this.DropDownList1.DataSource = ds.Tables["tz"];
this.DropDownList1.DataTextField = "name";
this.DropDownList1.DataValueField = "id";
this.DropDownList1.DataBind(); con.Close();
行 20: SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["sjk"]);
行 21: SqlDataAdapter sda = new SqlDataAdapter();
行 22: con.Open();
行 23: sda.SelectCommand = new SqlCommand("select name from tezheng", con);
行 24: DataSet ds = new DataSet();
文件源码:
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["sjk"]);
SqlDataAdapter sda = new SqlDataAdapter();
con.Open();
sda.SelectCommand = new SqlCommand("select name from tezheng", con);
DataSet ds = new DataSet();
sda.Fill(ds, "tz");
this.DropDownList1.DataSource = ds.Tables["tz"];
this.DropDownList1.DataTextField = "name";
this.DropDownList1.DataValueField = "id";
this.DropDownList1.DataBind(); con.Close();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货