请教:连接数据库时显示列名无效
编写下面的代码,运行时提示数据库表名personlike无效,应该是哪里出现问题了呢?protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = db.createconnection();
con.Open();
SqlCommand cmd = new SqlCommand("select * from personlike",con);
SqlDataReader sdr = cmd.ExecuteReader(); this.CheckBoxList1.DataTextField = "likeContent";
this.CheckBoxList1.DataValueField = "id";
this.CheckBoxList1.DataSource = sdr;
this.CheckBoxList1.DataBind();
sdr.Close();
con.Close();
}
红色行为错误提示行