asp大家帮我看个错误

来源:百度知道 编辑:UC知道 时间:2024/05/21 19:51:41
程序如下,我的库里明明有该月份的纪录,为何显示为空啊?!
accepttime为短日期格式,请高手救急,我的积分没了,不能悬赏了,请大家帮帮忙!
<%set rs=server.createobject("adodb.recordset")
rs.open "select id,casename,xyrname,xyrsex,casenature,sendaccusation,accepttime from aboutcase where accepttime between #2006-6-1# and #2006-12-30#", conn

if not rs.eof then
%>
……
<%if rs.eof then
response.write ("<script>alert('记录为空');location.href('select.htm')</script>")
end if
set rs=nothing
<% end if%>

<%if rs.eof then
改为
<%else

sql="select id,casename,xyrname,xyrsex,casenature,sendaccusation,accepttime from aboutcase where accepttime between #2006-6-1# and #2006-12-30#"
rs.open sql,conn,1,1
这样试试

多谢你,但是好像不是这个问题。(yan7j是我的另一个id)