找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 80|回复: 4

参数不足,期待是 1

[复制链接]
发表于 2010-1-19 02:13:39 | 显示全部楼层 |阅读模式 IP:江苏扬州
我做了一个在线留言

留言回复时 我发现只能回复数字,回复文字或字母就提示:

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e10'
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
/golden/hfly.asp,行 92

这个是hfly.asp页面:
<!--#include file="odbc_connection.asp"-->
<html>
<head>
<title>回复留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td {
font-size: 9pt;
}
-->
</style>
<style type="text/css">
<!--
a:link {
font-size: 9pt;
color: #000000;
text-decoration: none;
}
a:hover {
font-size: 9pt;
color: #FF0000;
}
a:visited {
font-size: 9pt;
color: #000000;
text-decoration: none;
}
-->
</style>
</head>
<body>
<table width="625" height="372" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="781" height="50">
<table width="96%" height="35" border="0" align="center" cellpadding="0" cellspacing="0" background="../image/zxly.jpg">
<tr>
<td width="86%" height="35" background="images/zxly.jpg">
<div align="center"></div></td>
<td width="14%"><font color="#FF3300"><strong><a href="ckly.asp">查 看 留 言</a></strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td height="28" valign="top">
<div align="center"><font color="#FF0000">回复留言</font></div></td>
</tr>
<tr>
<td valign="top" align="center"> <%=request("id")%>
<form name="form1" method="post" action="hfly.asp?id=<%=request("id")%>">
<TABLE cellSpacing=1 cellPadding=0 width="90%" bgColor=#000000>
<TBODY>
<TR>
<TD align=middle valign="top" bgColor=#ffffff><BR>
<TABLE cellSpacing=0 cellPadding=3 width="100%" align=center
bgColor=#0099cc>
<TBODY>
<TR bgColor=#ffffff>
<TD align=right width=110><div align="center">回复留言内容:</div></TD>
<TD align="left" valign="middle" >
<TEXTAREA name=cljg cols=45 rows=8 class=box id="cljg"></TEXTAREA></TD>
</TR>
<TR bgColor=#ffffff>
<TD width=110
height=30 align=middle
background=../images/line_21.gif >
<div align="center">回 复 密 码:</div></TD>
<TD align="left" valign="middle"
background=../images/line_21.gif><input name="pas" type="text" class="box1" id="pas" size="15" maxlength="50"></TD>
</TR>
</TBODY>
</TABLE>
<BR>
<INPUT type=submit value=提 交 name=submit>
 
<INPUT type=reset value=重 写 name=reset>
<BR>
<BR></TD>
</TR>
</TBODY>
</TABLE>
</form></td>
</tr>
</table>
<% Dim reply,id,sql
If Request("pas")="12345" Then '如果输入密码为12345,则执行回复
reply=LCase(Request("cljg"))
id=request("id")

sql="update guest set reply ="&reply&" where guest_id="&id
db.Execute(sql) '插入记录
db.Close
%> '重定向回首页
<meta http-equiv=refresh content="1; url=index.asp">
<title>回复成功</title><BODY bgcolor="#ffffff" text="#000000" link="#000080" alink="#800000" vlink="#2f2f4f" marginheight=0 marginwidth=0 topmargin=10 leftmargin=20 rightmargin=0>
<p> </p><p align="center"><font size="2">Please Wait......</font></p>
<p align="center"><font size="2">回复成功!二秒钟后系统自动返回留言簿页面</font></p>

<% ElseIf Request("pas")<>"" Then '如果输入密码有误,输出信息
Response.Write "密码错误,请重新输入"
End If
%>

</body>
</html>
发表于 2010-1-19 02:13:42 | 显示全部楼层 IP:江苏扬州
<!--#include file="odbc_connection.asp"-->中的odbc_connection.asp页面程序:
<%
Dim db,ConnStr
ConnStr="Dbq="&Server.Mappath("guest.mdb")&";Driver={Microsoft Access Driver (*.mdb)}"
Set db=Server.CreateObject("ADODB.Connection")
db.Open ConnStr
%>
大家帮忙看看拉
回复

使用道具 举报

发表于 2010-1-19 02:13:46 | 显示全部楼层 IP:江苏扬州
sql="update guest set reply ='"&reply&"' where guest_id="&id

reply是字符串,要在两边加引号,如果没有引号则表示一个字段名,通常字段名不存在会出现“参数不足”的错误

但是你如果回复填数值这样的常量的话会被自动转换成字符串,所以就不出错。
回复

使用道具 举报

发表于 2010-1-19 02:13:50 | 显示全部楼层 IP:江苏扬州
可以了,谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 13:27 , Processed in 0.232062 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表