急急急!!!求教!!谢谢!!!怎么改啊!!!
asp吧
全部回复
仅看楼主
level 1
美瞄miao 楼主
提示:ADODB.Recordset '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
\index.asp, line 91
急急急!!!怎么改啊!!
<! --# include file="conn.asp"-->
<%
cname=request.form("cname")
ctel=request.form("ctel")
cemail=request.form("cemail")
caddress=request.form("caddress")
ccontent=replace(request.form("ccontent"),vbcrlf,"/")
if cname<>""then
sql="select * from gbook" '连接对应的数据表
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew '添加新字段
rs("name")=cname
rs("tel")=ctel
rs("email")=cemail
rs("address")=caddress
rs("content")=ccontent
rs.update
response.redirect "lyok.asp" '重定向到留言成功提示窗口
rs.close
end if
%>
<html>
<head>
<style type="text/css">
<! --
td {font-size:14px;line-height:17px}
body {font-size:14px;line-height:17px}
p {margin-top:1;margin-bottom:1}
.style1{color:#D4D0C8}
-->
</style>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<title>asp动态程序——简单留言板</title>
<script language="javascript">
<!--
function checkadd()
{
if(document.postart.cname.value.length<1)
{
alert("请输入昵称!");
document.postart.cname.focus();
return false;
}
if(document.postart.ccontent.value.length<1)
{
alert("请输入留言!");
document.postart.ccontent.focus();
return false;
}
}
-->
</script>
</head>
<body>
<div align="center" style="width:720;height:500">
<form action=""method="post" name="postart" onsubmit="return checkadd()">
<table border="0" width="100%" cel
lsp
acing="0" cellpadding="0" height="280">
<tr>
<td><div align="center">简单留言本</div></td>
</tr>
<tr>
<td width="70%" align="right" valign="middle" height="99">
<p align="left">昵   称:<input type="text" name="cname" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">电   话:<input type="text" name="ctel" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">E-mail:<input type="text" name="cemail" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">主  页:<input type="text" name="caddress" size="30" maxlength="50" style="border: 1 solid #000000" value="http://"></p>
</td>
</tr>
<tr>
<td width="70%" align="right" valign="top" height="27">
<p align="left">留言内容:</td>
</tr>
<tr>
<td width="70%" align="right" valign="top" height="22">
<p align="left"><textarea rows="4" name="ccontent" cols="49" style="border:1 solid #000000"></textarea></td>
</tr>
<tr>
<td width="100%" align="right" height="40" colspan="2">
<p align="left"><input type="submit" value="提交" name="submit">
<input type="reset" value="取消" name="reset">
<input type="button" value="返回" name="back" onclick="javascript:history.back()">
</td>
</tr>
</table>
</form>
<%
2015年05月28日 06点05分 1
level 12
connstr 这个是数据库连接对象么?有没有正确连接
2015年05月28日 09点05分 2
level 11
大佬,可不可以共享一下?[滑稽]
2017年05月10日 16点05分 3
1