SQL2000 查询时间段问题 数据库里面的 uptime 时段 存储的时间为 2011年5月26日sql语句——select * from tb_files where Uptime between '2011年05月11日' and '2011年05月27日'问题 查询不了数据?请问是我sql语句错误了么 也没有报错啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 '2011年05月11日' 在数据库 不是datatime类型转换一下吧 请教大家,我有个随机的问题,我刚在学.net程序,有下到一个源码,就是随机抽取考卷的,下面是随机的,但是我想把随机改成不随机的,就是自动抽取前20条,排他们最开始的的输入顺序排列,该怎么样呢?谁能解答下:下面是部分代码,请问要改哪些?tx_extime.Value = Kminfo[3]; string lst = roandow_data(mySet.Tables[0].Rows.Count, int.Parse(Kminfo[1])); txID.Text = lst; txVuale.Text = Kminfo[2]; string[] lsts=lst.Split(';'); for (int i=0;i<lsts.Length;i++) { Table ntb = new Table(); TD1.Controls.Add(ntb); TableRow ntr = new TableRow(); ntb.Controls.Add(ntr); TableCell ntc = new TableCell(); ntr.Controls.Add(ntc); Label nlb = new Label(); nlb.Font.Bold = true; nlb.Font.Size = 11; nlb.Text = (i+1).ToString() + "、" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_question"].ToString(); ntc.Controls.Add(nlb); ntr = new TableRow(); ntb.Controls.Add(ntr); ntc = new TableCell(); ntr.Controls.Add(ntc); RadioButtonList nrbl = new RadioButtonList(); for (char ia = 'A'; ia <= 'D'; ia++) { ListItem li = new ListItem(); li.Text = ia.ToString() + "、" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_key" + ia.ToString()].ToString(); li.Value = ia.ToString(); nrbl.Items.Add(li); } nrbl.ID = "q_" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_id"].ToString(); ntc.Controls.Add(nrbl); } Button1.Visible = true; } private string roandow_data(int allcount, int thecount) { Random rnd = new Random(); List<int> lst = new List<int>(); int i = 0; string str = ""; while (i < thecount) { int j = rnd.Next(allcount); if (lst.IndexOf(j) == -1) { lst.Add(j); i++; } } foreach (int j in lst) { if (str.Length == 0) { str = j.ToString(); } else { str = str + ";" + j.ToString(); } } return str; where replace(replace(REPLACE(Uptime,'年','-'),'月','-'),'日','') between '2011-05-11' and '2011-05-27' 我在取值的时候 DateTime.Parse(textdate.text.tirm().tostring()); 还是不行 数据库的字段转换下再看看 你先看看写入数据库的Uptime 的字段的类型,在传值的时候就传如何数据库一样的类型即可。 我用的是My97DatePicker 控件 取值时候 取得是'2011年05月11日' 数据库修改后存的是'2011-05-11' 现在 是取值 怎么 取来和数据库一直呢 防止用户修改页面参数访问权限外的信息? 进着又分 请教一个关于asp.net三层的问题? 超晕的问题,上传网站不能浏览! bcp导入大量数据的问题,出现错误,请高手指点,谢谢! 刚刚谁给我发信息了? 熟手希望能在重庆本地找个3000块的工作 分享ASP.NET AJAX深入浅出系列课程,视频,很好,给大家分享一下 xsl文件中能使用中文吗? 大哥们帮帮忙,无刷新的问题!!!谢谢了!!! DropDownList1”有一个无效 SelectedValue,因为它不在项目列表中。 我XSql sever 2000 竟然出现了一个惊天的BUG......
tx_extime.Value = Kminfo[3];
string lst = roandow_data(mySet.Tables[0].Rows.Count, int.Parse(Kminfo[1]));
txID.Text = lst;
txVuale.Text = Kminfo[2];
string[] lsts=lst.Split(';');
for (int i=0;i<lsts.Length;i++)
{
Table ntb = new Table();
TD1.Controls.Add(ntb);
TableRow ntr = new TableRow();
ntb.Controls.Add(ntr);
TableCell ntc = new TableCell();
ntr.Controls.Add(ntc);
Label nlb = new Label();
nlb.Font.Bold = true;
nlb.Font.Size = 11;
nlb.Text = (i+1).ToString() + "、" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_question"].ToString();
ntc.Controls.Add(nlb);
ntr = new TableRow();
ntb.Controls.Add(ntr);
ntc = new TableCell();
ntr.Controls.Add(ntc);
RadioButtonList nrbl = new RadioButtonList();
for (char ia = 'A'; ia <= 'D'; ia++)
{
ListItem li = new ListItem();
li.Text = ia.ToString() + "、" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_key" + ia.ToString()].ToString();
li.Value = ia.ToString();
nrbl.Items.Add(li);
}
nrbl.ID = "q_" + mySet.Tables[0].Rows[int.Parse(lsts[i])]["q_id"].ToString();
ntc.Controls.Add(nrbl);
}
Button1.Visible = true;
}
private string roandow_data(int allcount, int thecount)
{
Random rnd = new Random();
List<int> lst = new List<int>();
int i = 0;
string str = "";
while (i < thecount)
{
int j = rnd.Next(allcount);
if (lst.IndexOf(j) == -1)
{
lst.Add(j);
i++;
}
}
foreach (int j in lst)
{
if (str.Length == 0)
{
str = j.ToString();
}
else
{
str = str + ";" + j.ToString();
}
}
return str;
between '2011-05-11' and '2011-05-27'
' 现在 是取值 怎么 取来和数据库一直呢