| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 906 人关注过本帖
标题:[原创]求助,产品发布系统参数不足
只看楼主 加入收藏
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
结帖率:77.27%
收藏
 问题点数:0 回复次数:4 
[原创]求助,产品发布系统参数不足

<!--#include file="conn.asp"--> <% set rst=server.CreateObject("adodb.recordset") sql="select top 3 * from chanpin order by id desc" rst.open sql,conn,1 %>

<html> <head>

<title>正和通信有限公司产品展示</title> <link href="sina.css" rel="stylesheet" type="text/css"> </head> <style type="text/css"> <body>{ margin-top: 0px; } </style> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } //--> </script>

<table border="0" cellpadding="0" cellspacing="0" width="788"> <!-- fwtable fwsrc="?′?ü??" fwbase="img/index.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td width="180"><img src="spacer.gif" width="176" height="1" border="0" alt=""></td> <td width="148"><img src="spacer.gif" width="143" height="1" border="0" alt=""></td> <td width="153"><img src="spacer.gif" width="147" height="1" border="0" alt=""></td> <td width="150"><img src="spacer.gif" width="145" height="1" border="0" alt=""></td> <td width="19"><img src="spacer.gif" width="19" height="1" border="0" alt=""></td> <td width="148"><img src="spacer.gif" width="148" height="1" border="0" alt=""></td> <td width="17"><img src="spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="6"><img name="img/index_r1_c1" src="img/index_r1_c1.gif" width="778" height="101" border="0" alt=""></td> <td><img src="spacer.gif" width="1" height="101" border="0" alt=""></td> </tr> <tr> <td colspan="6"><img name="img/index_r2_c1" src="img/index_r2_c1.gif" width="778" height="111" border="0" alt=""></td> <td><img src="spacer.gif" width="1" height="111" border="0" alt=""></td> </tr> <tr> <td rowspan="5" valign="top" background="img/indexbg.gif"><img src="img/index_r3_c1.gif" alt="" name="img/index_r3_c1" width="176" height="217" border="0" usemap="#img/index_r3_c1Map"> <table width="176" height="69" background="img/indexbg.gif"> <tr><td > </td> </tr> </table> </td>

</tr> <tr> <td></td> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="5" align="center"><table><tr><td height="244"> <table width="65%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><br> <form name="Frm" method="post" action="chanshow.asp" onSubmit="return check_input()"> 产品检索 <input type="text" name="keyword" value=""><select name="xiaolei" class="button1" id="xiaolei"> <option value="" selected>产品类型</option>

<% Set rst1 = Server.CreateObject("ADODB.Recordset") sql="select * from chanpin" set rs=conn.execute(sql) if not rs.bof then Do While Not rs.eof Response.Write("<option value="&rs("xiaolei")&">"&rs("xiaolei")&"</option>")

rs.MoveNext Loop end if rs.close set rs=nothing %> </select> <div align="center"> <input type="submit" name="Submit" value=" 搜 索 "></div> </form> </td> </tr> </table> <p></p> <table width="100%" height="169" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="1">

<tr> <td ><table><tr> <td> <% pages=cint(request.querystring("pages")) xiaolei=Request("xiaolei") keyword=Request("keyword") if len(keyword)=0 and xiaolei="" then sql3="select * from chanpin order by id desc" end if if len(keyword)=0 and xiaolei<>"" then sql3="select * from chanpin where xiaolei="&xiaolei&" order by id desc" end if if len(keyword)<>0 and xiaolei<>"" then sql3="select * from chanpin where mingzi like'%"&keyword&"%'and id="&id&" order by id desc" end if if len(keyword)<>0 and xiaolei="" then sql3="select * from chanpin where mingzi like'%"&keyword&"%' order by id desc" end if Set rs1 = Server.CreateObject("ADODB.Recordset") rs1.open sql3,Conn,3,2 if rs1.EOF and rs1.bof then Response.Write "暂时没有该类下相应的产品。" response.End() else rs1.pagesize=16 if pages=0 then pages=1 else rs1.move (pages-1)*rs1.pagesize end if if pages<rs1.pagecount then currentcount=rs1.pagesize else currentcount=rs1.Recordcount-(pages-1)*rs1.pagesize end if %> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <% i=1 for j=1 to currentcount%> <td height="122" align="center"><table> <tr> <td> <%if rs1("tupian")<>"" then%> <a href="chanpin.asp?id=<%=rs1("id")%>" target="_blank"><img src="<%=rs1("tupian")%>" border=1 style='border-color:#000000' alt='点击看详细资料' width=120 height=106></a> <% else %> <a href="chanpin.asp?id=<%=rs1("id")%>" target="_blank"><img src="zanwu.jpg" border=1 style='border-color:#000000' alt='点击看详细资料' width=111 height=108></a> <% end if %> </td> </tr> <tr> <td><div align="center"><b><%=rs1("mingzi")%></b></div></td> </tr> </table></td> <%

if i mod 4= 0 then %> </tr> <tr> <%end if%> <% i=i+1 if not rs1.eof then rs1.movenext next end if %> </tr><tr><td align="right"> <%if pages>1 then response.Write"<a href='chanshow.asp?id="&id&"&pages="&pages-1&"'>前一页</a>&nbsp;" else response.Write"前一页&nbsp;" end if

response.write"&nbsp;"

if pages<rs1.pagecount then response.Write"<a href='chanshow.asp?id="&id&"&pages="&pages+1&"'>后一页</a>" else response.write"后一页" end if %></td></tr> </table></td> </tr></table></td> </tr> </table></td> </tr> </table>

</td> <td>&nbsp;</td> </tr></table> </td></table> </td> <td colspan="6" valign="bottom"><img name="img/index_r8_c1" src="img/index_r6_c1.gif" width="778" height="88" border="0" alt=""></td> <td><img src="spacer.gif" width="1" height="83" border="0" alt=""></td>

</table>

</body> </html>错误类型: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。 /zhenghe/chanshow.asp, 第 127 行

为什么不我知道,,大家看看哪不足,呵呵,

搜索更多相关主题的帖子: sina 参数 系统 rst 
2004-12-14 15:16
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
红色的是127行,帮帮忙看看,,我现在找不着,,不知道为什么,,查不出来,,晕,,

面朝大海,春暖花开!
2004-12-14 16:11
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 

参数不足,期待是 1。

这个错误通常是因为字段名写错造成的。


天津网站建设 http://www./
2004-12-14 16:51
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
有可能,可是晚找不出来,替我看看,,我这出错,是分类查询那出错,单个查报错但是能查出来,用下拉菜单那查,一查就出错,我不知道是哪不对,,,

面朝大海,春暖花开!
2004-12-14 17:42
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
我找的差不多了,是字段那查询单引号的事,可是还报错,,晕,,

面朝大海,春暖花开!
2004-12-14 18:03
快速回复:[原创]求助,产品发布系统参数不足
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025298 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved