ASP+Access至少一个参数没有被指定值2
<!--#include file="connection.asp"--><body bgcolor="#E1F1E4">
<%
id=session("id")
'pw=session("pw")
conn.Open ConnStr
set rs=server.createobject("adodb.recordset")
sql="select * from loginmima where name='"&id&"'"
set rs=conn.execute(sql)
if not rs.eof then
session("id")=id
'session("pw")=pw
else%>
<script language="VBScript">
alert("对不起,您尚未登录或登录超时,请先登录!")
location.href="index.asp"
</script>
<%
response.end
end if
%>
<%
'conn.Open ConnStr
'set rs=server.CreateObject("adodb.recordset")
biao=session("biao")
f_name=session("f_name")
xname=session("name")
f_sex=session("f_sex")
sex=session("sex")
f_chushengfanwei=session("f_chushengfanwei")
chushengy1=session("y1")
chushengy2=session("y2")
f_diqu=session("f_diqu")
diqu=session("diqu")
f_canjileibie=session("f_canjileibie")
canjileibie=session("canjileibie")
f_canjidengji=session("f_canjidengji")
canjidengji=session("canjidengji")
yy1=session("tjyy1")
yy2=session("tjyy2")
strsql="select "&session("biao")&"."&session("biao")&"_year,count(*) as summ from disableman,"&session("biao")&" where disableman.残疾人证号="&session("biao")&"."&session("biao")&"_cjzh "
if(session("f_sex")="f_sex") then
strsql=strsql&" and disable.性别="&sex&" "
end if
if(session("f_chushengfanwei")="f_chushengfanwei") then
if session("y1")<session("y2") then
strsql=strsql&" and (left(disableman.出生年月,4)>="&session("y1")&" and left(disableman.出生年月,4)<="&session("y2")&" ) "
end if
if session("y1")>session("y2") then
strsql=strsql&" and (left(disableman.出生年月,4)>="&session("y2")&" and left(disableman.出生年月,4)<="&session("y1")&" ) "
end if
if session("y1")=session("y2") then
strsql=strsql&" and (left(disableman.出生年月,4)>="&session("y1&")&" and left(disableman.出生年月,4)<="&session("y2")&" ) "
end if
end if
if(session("f_diqu")="f_diqu") then
strsql=strsql&"and disableman.地区="&session("diqu")&" "
end if
if(session("f_canjileibie")="f_canjileibie")then
strsql=strsql&"and and disableman.残疾类别="&session("canjileibie")&" "
end if
if(session("f_canjidengji")="f_canjidengji")then
strsql=strsql&"and disableman.残疾等级="&session("canjidengji")&""
end if
if (session("f_tjnf")="f_tjnf") then
if session("tjyy1")<session("tjyy2") then
strsql=strsql&" and (left("&session("biao")&"."&session("biao")&"_year,4)>="&session("tjyy1")&" and left("&session("biao")&"."&session("biao")&"_year,4)<="&session("tjyy2")&" ) "
end if
if session("tjyy1")>session("tjyy2") then
strsql=strsql&" and (left("&session("biao")&"."&session("biao")&"_year,4)>="&session("tjyy2")&" and left("&session("biao")&"."&session("biao")&"_year,4)<="&session("tjyy1")&" ) "
end if
if session("tjyy1")=session("tjyy2") then
strsql=strsql&" and (left("&session("biao")&"."&session("biao")&"_year,4)>="&session("tjyy1")&" and left("&session("biao")&"."&session("biao")&"_year,4)<="&session("tjyy2")&" ) "
end if
end if
strsql=strsql&" group by "&session("biao")&"."&session("biao")&"_year "
session("strsql")=strsql
response.Write(strsql)
response.Redirect"kangfu_user_tj.asp"
%>
kangfu_user_tj.asp
<!--#include file="connection.asp"-->
<%
conn.Open ConnStr
set rs=server.createobject("adodb.recordset")
strsql=session("strsql")
'lianjie = session("lianjie")
'biao = session("biao")
'chaxun_year=session("chaxun_year")
'f_nianfen=session("f_nianfen")
'yy1=session("tjyy1")
'yy2=session("tjyy2")
rs.open strsql,conn,1,3
if rs.eof then
response.Write"<script>alert('对不起,没有您要查找的人!');history.back();</script>"
response.end
else
rs.pagesize=32
page=clng(request.QueryString("page"))
if page<=0 then
page=1
end if
if request.QueryString("page")="" then
page=1
end if
rs.absolutepage=page
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>汇总表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
</style>
</head>
<body bgcolor="#E1F1E4">
<table width="100%" border="0" cellspacing="1" bgcolor="#3cb371">
<tr >
<td height="25" colspan="15" background="image/bg2.jpg"><div align="center" class="style1"> <span class="style2">
<%response.Write(session("tjyy1"))%>年~<%response.Write(session("tjyy2"))%>年
汇总统计表</div></td>
</tr>
<tr >
<td height="25" colspan="15" background="image/bg2.jpg"><div align="center">统计条件:姓名:<% if session("f_name")="f_name" then response.Write(session("name")) end if %>,性别:<%if session("f_sex")="f_sex" then response.Write(session("sex")) end if%> ,地区:<% if session("f_dq")="f_dq" then response.Write(session("diqu")) end if %>,残疾类别:<% if session("f_canjileibie")="f_canjileibie" then response.Write(session("canjileibie")) end if%>,残疾等级:<% if session("f_canjidengji")="f_canjidengji" then response.Write(session("canjidengji")) end if%>,出生范围:<% if session("f_chushengfanwei")="f_chushengfanwei" then response.Write(session("y1"))end if%></div></td></tr>
<tr bgcolor="#9bcd9b">
<td width="8%" nowrap><div align="center">年份</div></td>
<td width="5%" nowrap><div align="center">人数</div></td>
<td width="10%" nowrap><div align="center">详细</div></td>
</tr>
<%
count=0
do while not rs.eof and count<rs.pagesize
%>
<tr bgcolor="#C9E7CF">
<td nowrap><div align="center"><%=response.write(rs(""&session("biao")&"."&session("biao")&"_year"))%></div></td>
<td nowrap><div align="center"><%=response.write(rs("summ"))%></div></td>
<td nowrap><div align="center">查看详细</a></div></td>
</tr>
<%
count=count+1
rs.movenext
loop
end if
%>
<tr >
<td height="25" colspan="15" background="image/bg2.jpg"><div align="right">共<%=rs.recordcount%>条记录,每页显示<%=rs.pagesize%>条 ,第<%=page%>/<%=rs.pagecount%>页
<%if page>1 then%>
<a href="kangfu_user_fljy_chaxundisplay.asp?Page=<% = 1%>">首页</a> <a href="kangfu_user_fljy_chaxundisplay.asp?Page=<% =page -1 %>">上一页</a>
<%end if %>
<%if page<>rs.pagecount then %>
<a href="kangfu_user_fljy_chaxundisplay.asp?Page=<% =page + 1%>">下一页</a> <a href="kangfu_user_fljy_chaxundisplay.asp?Page=<% = rs.PageCount%>">尾页</a>
<% end if %>
<select name="page" id="page" onChange="javascript:window.location.href('kangfu_user_fljy_chaxundisplay.asp?page='+this.options[this.selectedIndex].value+'')">
<% for i=1 to rs.pagecount%>
<option value="<%=i%>" <%if i=page then response.Write("selected") end if%> ><%=i%> </option>
<% next %>
</select>
<a href="kangfu_user_fljy_print.asp" target="_blank" alt="ASP+Access最少一个参数没有被指定值2" />