琢本监制:[asp]参数不足,期待是1

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 17:42:40
<!--#include file="conn.asp"--><style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #000000;
}
body {
background-color: #CCCCCC;
}
a {
font-size: 12px;
color: #0099FF;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #CC3300;
}
a:hover {
text-decoration: underline;
color: #0099FF;
}
a:active {
text-decoration: none;
color: #CC3300;
}
-->
</style>

<b><a href="addnews.asp">发表新闻</a></b><br><br>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; " bordercolor="#000000" width="100%" height="26">
<tr>
<td width="17%"><b>作者</b></td>
<td width="83%">
<table width="759" border="0">
<tr>
<td width="313"><b>主题 </b></td>
</tr>
</table>
<b> </b></td>
</tr>
</table>
</center>
</div><hr size="1">
<%i=1
set shownew=conn.execute("select*from new order by id desc")
do while not shownew.eof
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; " bordercolor="#000000" width="100%" height="20">
<tr>
<td width="17%"><%=shownew("name")%> </td>
<td width="83%">
<a href="show.asp?id=<%=shownew("id")%>"><%=shownew("title")%></a></td>
</tr>
</table>
</center>
</div><hr size="1">
<%i=i+1
if i>100 then exit do
shownew.movenext
Loop
shownew.Close
set shownew=nothing
%>

以上是代码 我的表名是new 有字段 id ,title, name,body,shijian,laiyuan.

为什么可以把数据写到库里 但是到显示列表的页面,也就是以上代码,却显示的是

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
/admin_newlist.asp, 第 50 行

select * from [new] order by id desc

这样看看

set shownew=conn.execute("select*from new order by id desc")
其中的*两边有没有空格??