请问这是什么错误呢?'System.Web.UI.WebControls' 包含的前缀数目超过了最大值。最大值为 3。

来源:百度知道 编辑:UC知道 时间:2024/07/02 20:12:11
如提名称 'System.Web.UI.WebControls' 包含的前缀数目超过了最大值。最大值为 3。
请问这个是什么错误呢?
string sql3 = "select * from test where djsj between " + datefrom + " and " + dateto + "";
SqlDataAdapter adp = new SqlDataAdapter();
adp.SelectCommand = new SqlCommand(sql3, conn);
DataSet ds = new DataSet();
adp.Fill(ds);
我在写这个查询代码的时候出错,出错的句子是adp.Fill(ds),请问这个是什么意思呢,有哪些可能的问题导致了这个出错?请高手指教,谢谢了

string sql3 = "select * from test where djsj between '" + datefrom + "' and '" + dateto + "'";
是你的语句写的有问题,你没有取到控件的值!把那两个值好好查一下,调试的时候跟踪一下!

看起来不像是 System.Web.UI.WebControls 的错,先这样改改再看看?
string sql3 = "select * from test where djsj between '" + datefrom + "' and '" + dateto + "'";