ADODB.Recordset 错误 '800a0bb9'参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突
<!--#includefile="top1.asp"--><%dimKC_XH,KC_CP,KC_PH,KC_NKC_XH=request("KC_XH")KC_CP=...
<!--#include file="top1.asp" -->
<%
dim KC_XH, KC_CP, KC_PH, KC_N
KC_XH=request("KC_XH")
KC_CP=request("KC_CP")
KC_PH=request("KC_PH")
KC_N=request("KC_N")
%>
<%
Dim rs
dim sqltext ,flag
flag="尚未处理"
Set rs = Server.CreateObject("ADODB.Recordset")
sqltext = "SELECT * FROM KC WHERE KC_XH like '%"&KC_XH&"%' AND KC_CP like '%" &KC_CP& "%' AND KC_PH like '%" &KC_PH& "%'"
rs.open sqltext,oconn,1,3
dim PerPage
PerPage=30
'假如没有数据时
If rs.eof and rs.bof then
'call showpages
response.write "<p align='center'><font color='#ff0000'>未找到相关产品。</font></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage,CurrentPage
text="0123456789"
rs.PageSize=PerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > rs.PageCount Then CurrentPage = rs.PageCount
Else
CurrentPage= 1
End If
If not rs.eof Then rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
If rs.recordcount > PerPage then
end if
Sub list()
%>
<%
if not rs.eof then
do while not rs.eof
if i mod 2 = 0 then
%>
<% else %>
<%end if%>
<%
i=i+1
if i >= Perpage then exit do
rs.MoveNext()
loop
end if
%>
<%
Response.write "<strong><font color='#000000'>-> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(rs.RecordCount) & "</font>" & "<font color='#000000'>个产品</font></strong> "
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong> "
If currentpage > 1 Then
response.write "<strong><a href='pro_search.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='pro_search.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < rs.PageCount Then
Response.write "<strong><a href='pro_search.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='pro_search.asp?page="+Cstr(rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong> "
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong> "
End if
%>
<%
End sub
rs.Close()
Set rs = Nothing
%> 展开
<%
dim KC_XH, KC_CP, KC_PH, KC_N
KC_XH=request("KC_XH")
KC_CP=request("KC_CP")
KC_PH=request("KC_PH")
KC_N=request("KC_N")
%>
<%
Dim rs
dim sqltext ,flag
flag="尚未处理"
Set rs = Server.CreateObject("ADODB.Recordset")
sqltext = "SELECT * FROM KC WHERE KC_XH like '%"&KC_XH&"%' AND KC_CP like '%" &KC_CP& "%' AND KC_PH like '%" &KC_PH& "%'"
rs.open sqltext,oconn,1,3
dim PerPage
PerPage=30
'假如没有数据时
If rs.eof and rs.bof then
'call showpages
response.write "<p align='center'><font color='#ff0000'>未找到相关产品。</font></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage,CurrentPage
text="0123456789"
rs.PageSize=PerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > rs.PageCount Then CurrentPage = rs.PageCount
Else
CurrentPage= 1
End If
If not rs.eof Then rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
If rs.recordcount > PerPage then
end if
Sub list()
%>
<%
if not rs.eof then
do while not rs.eof
if i mod 2 = 0 then
%>
<% else %>
<%end if%>
<%
i=i+1
if i >= Perpage then exit do
rs.MoveNext()
loop
end if
%>
<%
Response.write "<strong><font color='#000000'>-> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(rs.RecordCount) & "</font>" & "<font color='#000000'>个产品</font></strong> "
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong> "
If currentpage > 1 Then
response.write "<strong><a href='pro_search.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='pro_search.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < rs.PageCount Then
Response.write "<strong><a href='pro_search.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='pro_search.asp?page="+Cstr(rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong> "
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong> "
End if
%>
<%
End sub
rs.Close()
Set rs = Nothing
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询