翻页多参数(不定)传递问题!在线================
========================取值判断(共有6个参数)============================
sql="select * from fix_archives"
listsql="select * from fix_archives"
if strmach_no <> "" then
listsql=listsql&" where mach_no='"& strmach_no &"'"
end if
if strrwdh <> "" then
if sql<>listsql then
listsql=listsql&" and rwdh='"& strrwdh &"'"
else
listsql=listsql&" where rwdh='"& strrwdh &"'"
end if
end if
if strsummons_time <> "" then
if sql<>listsql then
listsql=listsql&" and summons_time='"& strsummons_time &"'"
else
listsql=listsql&" where summons_time='"& strsummons_time &"'"
end if
end if
if strcomplete_time <> "" then
if sql<>listsql then
listsql=listsql&" and complete_time='"& strcomplete_time &"'"
else
listsql=listsql&" where complete_time='"& strcomplete_time &"'"
end if
end if
=============================下面是三个下拉选择====================
if strsummons_type <> "-请选择-" then
if sql<>listsql then
listsql=listsql&" and summons_type='"& strsummons_type &"'"
else
listsql=listsql&" where summons_type='"& strsummons_type &"'"
end if
end if
if strfixer <> "-请选择-" then
if sql<>listsql then
listsql=listsql&" and fixer='"& strfixer &"'"
else
listsql=listsql&" where fixer='"& strfixer &"'"
end if
end if
if strmonth <> "-请选择-" then
if sql<>listsql then
listsql=listsql&" and month="& strmonth &""
else
listsql=listsql&" where month="& strmonth &""
end if
end if
%>
<%
response.Write listsql
rs.open listsql,conn,1,1
rs.pagesize=maxperpage
if trim(request("page"))<>"" then
currentpage=CLng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
if rs.Eof then
response.write"对不起!没有找到你要找的记录!"
else
totalput=rs.recordcount
if currentpage<>1 then
if (currentpage-1)*maxperpage<totalput then
rs.move(currentpage-1)*maxperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
dim n,k
if (totalput mod maxperpage)=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
%>
====================显示记录数====================================
第<font color=#0000ff><%=currentpage%></font>页/共<font color=#0000ff><%=n%></font>页----总计<font color=#0000ff><%=rs.recordcount%></font>条记录
<%
========================翻页======================================
k=currentpage
if k<>1 then
response.write"[<b>"+"<a href=look_fix.asp?page=1&mach_no='"& strmach_no &"'&rwdh='"& strrwdh &"'&summons_time='"& strsummons_time &"'&complete_time='"& strcomplete_time &"'&summons_type='"& strsummons_type &"'&fixer='"& strfixer &"'&month="& strmonth &">第一页</a></b>]"
response.write"[<b>"+"<a href=look_fix.asp?page="+cstr(k-1)+"&mach_no='"& strmach_no &"'&rwdh='"& strrwdh &"'&summons_time='"& strsummons_time &"'&complete_time='"& strcomplete_time &"'&summons_type='"& strsummons_type &"'&fixer='"& strfixer &"'&month="& strmonth &">上一页</a></b>]"
else
response.write"[第一页][上一页]"
end if
if k<>n then
response.write"[<b>"+"<a href=look_fix.asp?page="+cstr(k+1)+"&mach_no='"& strmach_no &"'&rwdh='"& strrwdh &"'&summons_time='"& strsummons_time &"'&complete_time='"& strcomplete_time &"'&summons_type='"& strsummons_type &"'&fixer='"& strfixer &"'&month="& strmonth &">下一页</a></b>]"
response.write"[<b>"+"<a href=look_fix.asp?page="+cstr(n)+"&mach_no='"& strmach_no &"'&rwdh='"& strrwdh &"'&summons_time='"& strsummons_time &"'&complete_time='"& strcomplete_time &"'&summons_type='"& strsummons_type &"'&fixer='"& strfixer &"'&month="& strmonth &">最后一页</a></b>]"
else
response.write"[下一页][最后一页]"
end if
第一页能正确的显示,但翻页就这样的问题:
select * from fix_archives where summons_type='' and fixer='' and month=
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'
ODBC 驱动程序不支持所需的属性。
而且页面地址是这样的:
http://server/wx/look_fix.asp?page=2&mach_no=''&rwdh=''&summons_time=''&complete_time=''&summons_type='-请选择-'&fixer='-请选择-'&month=-请选择-
很明显是参数没传过来!
请教如何处理!谢谢!