为什么有时请求这个方法 结果的数量不一样呢?
[WebMethod(EnableSession = true)]
public List<string> GetRUIDList(string beginDate, string endDate)
{
List<string> ruidLst = new List<string>();
DataAccess da = new DataAccess();
string table = "S_DO4";
string field = "RUID";
string where = String.Format(" CREATETIME >= '{0}' AND CREATETIME < '{1}' AND TYPECODE={2} ", beginDate, endDate, DOCODE);
DataSet dsRuid = da.GetTableValue(table, field, where);
for (int i = 0; i < dsRuid.Tables[0].Rows.Count; i++)
{
ruidLst.Add(dsRuid.Tables[0].Rows[i][0].ToString());
}
return ruidLst;
[WebMethod(EnableSession = true)]
public List<string> GetRUIDList(string beginDate, string endDate)
{
List<string> ruidLst = new List<string>();
DataAccess da = new DataAccess();
string table = "S_DO4";
string field = "RUID";
string where = String.Format(" CREATETIME >= '{0}' AND CREATETIME < '{1}' AND TYPECODE={2} ", beginDate, endDate, DOCODE);
DataSet dsRuid = da.GetTableValue(table, field, where);
for (int i = 0; i < dsRuid.Tables[0].Rows.Count; i++)
{
ruidLst.Add(dsRuid.Tables[0].Rows[i][0].ToString());
}
return ruidLst;
CREATETIME >= '2012-1-1' AND CREATETIME < '2012-1-2'
string beginDate, string endDate
每次传过来的参数是不是一样?DOCODE
这个东西没看到赋值,是不是每次值都不一样
sql语句,sql server会把字符串转成DateTime的。