大虾看一下这段代码为什么会出现这样的错误
错误类型:ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/1/untitled1.asp, 第 14 行
程序代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.> <html xmlns="http://www.> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> </head> <body> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <%dim rs set rs=server.createobject("adodb.recordset") sql="select * from cominfo order by comid desc" rs.open sql,conn,1,3 IF not rs.eof Then proCount=rs.recordcount rs.PageSize=25 '定义显示数目 if not IsEmpty(Request("ToPage")) then ToPage=CInt(Request("ToPage")) if ToPage>rs.PageCount then rs.AbsolutePage=rs.PageCount intCurPage=rs.PageCount elseif ToPage<=0 then rs.AbsolutePage=1 intCurPage=1 else rs.AbsolutePage=ToPage intCurPage=ToPage end if else rs.AbsolutePage=1 intCurPage=1 end if intCurPage=CInt(intCurPage) k=1 do while Not rs.eof and k<5 '控制显示行数 %> <tr> <% for n=1 to 5 %> <td align="center"><table width="19%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <table border="0" cellpadding="0" cellspacing="3" align="center"> <tr> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="120" height="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#666600"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="120" height="100" align="center"><span href="showproduct.asp?id=<%=rs("comid")%>" target=_blank><img src="<%=rs("comurl")%>" width="120" height="120" border="0" /></a></span></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td> <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><font color="#E23C08"> <% if len(rs("commodel"))<=8 then Response.write rs("commodel") else response.write left(rs("commodel"),8)&"..." end if %> </font></div></td> </tr> </table></td> </tr> </table> </td> </tr> </table> </td> <% rs.movenext if rs.eof then exit for if rs.eof then exit do Next %> </tr> <% k=k+1 Loop %> </table></td> </tr> </table> <table width="100%" height="57" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="56"> <div align="right"><span style="font-size: 9pt;"> 总共:<font color="#ff0000"><%=rs.PageCount%></font>页, <font color="#ff0000"><%=proCount%></font>个产品, 当前页:<font color="#ff0000"> <%=intCurPage%> </font> <% if intCurPage<>1 then %> <a href="?ToPage=1">首页</a>|<a href="?ToPage=<%=intCurPage-1%>">上一页</a>| <% end if if intCurPage<>rs.PageCount then %> <a href="?ToPage=<%=intCurPage+1%>">下一页</a>|<a href="?ToPage=<%=rs.PageCount%>"> 最后一页</a> <% end if%> </span></div> </form> <div align="right"> <%end if%> </div></td> </tr> </table></td> </tr> </table> </body> </html>