怪问题. 限制了填写内容的大小

My_first 2004-01-07 11:18:36
数据库是access, 字段是备注类型,
通过下面的语句向数据库里提交内容

<form action="Copost.asp" >
<textarea name="content" cols="80" rows="12" class="Input" ></textarea>
<br></br>
<input type="submit" value="提交" id=submit12 name=submit1 border=0 valign="middle" class="btn">
</form>

当填写的内容少时,内容可以提交到数据库, 当填写的文字内容很多时, 点提交按钮一点反应都没有, 开始以为是数据库content字段装不下, 打开access数据库,直接把要填写的文字内容贴到备注字段,完全可以填写得下去。 这是怎么回事,需要设置什么吗? 还是填写很多内容时,不能用<textarea></textarea> 这个控件。


谢.
...全文
41 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
flying310 2004-01-07
  • 打赏
  • 举报
回复
<form action="Copost.asp" method="post">
<textarea name="content" cols="80" rows="12" class="Input" ></textarea>
<br></br>
<input type="submit" value="提交" id=submit12 name=submit1 border=0 valign="middle" class="btn">
</form>
在试试
walsh 2004-01-07
  • 打赏
  • 举报
回复
主要的问题就是没有写method=post.

前段时间我也碰到过.
My_first 2004-01-07
  • 打赏
  • 举报
回复
这是COADD.ASP的源程序. 如下.

<!--#include FILE="common.asp"-->

<%dim DB,forum,folder_ID,j,Folder_name,rs,rs2,folder2_ID,Folder2Name,recordcount,hasright,i,pageindex,pagecount,PriorPageIndex,NextPageIndex,forumid,keyword
set DB = new CDB%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- #include file ="title.asp" -->
<br>

<%chkright UserRight,Right_User
%>

<table border="0" align="center" width="700" cellspacing="1" cellpadding="2">
<tr>
<td width="500">
<b><a href="default.asp">首页</a>  > 
</a>发布新贴
</b>
</td>
</tr>
</table>
<br>

<table border="0" align="center" width="700" cellspacing="1" cellpadding="5" bgcolor="#6699cc">
<%
set rs = DB.GetFoldListPname("发展")
Do until rs.EOF
%>
<tr "content2">
<%folder_ID=rs("ID")
Folder_name=rs("NAME")%>
<td class="colheader3">
<%=rs("NAME")%>
</td>
</tr>
<%rs.MoveNext%>
<%Loop%>



<tr class="content1">
<form action="Copost.asp" >

<tr bgcolor="#ffffff"><td>类别:</td></tr>
<tr bgcolor="#ffffff">
<td >
<%
set rs2 = DB.GetchildFoldList(folder_ID)
Do until rs2.EOF
folder2_ID=rs2("ID")
Folder2Name=rs2("Name")
%>
<input name="forumid" type="radio" value="<%=folder2_ID%>" checked><%=rs2("NAME")%>
<%rs2.MoveNext%>
<%Loop%>
</td>
</tr>
<td bgcolor="#ffffff">
主题:<input type="text" name="subject" class="tx1"><font color="#FF0000">*</font><br><br>
内容: <font color="#FF0000">*</font><br>
<textarea name="content" cols="80" rows="12" class="Input" ></textarea>
<br></br>
<input type="submit" value="发布" id=submit12 name=submit1 border=0 valign="middle" class="btn">
<input class="btn" type="reset" value="还原" name="BR">
</td>
</form>

</tr>

</table>

<!--#include FILE="bottom.asp"-->

</body>
</html>

xieyj 2004-01-07
  • 打赏
  • 举报
回复
access数据库的备注字段最多为 65535 个字符,可能你输入的字符超过了限制
lang11zi 2004-01-07
  • 打赏
  • 举报
回复
内容应该有限制长度的,太长了它会截取,你可能是提交的页面没有执行吧
chhwang 2004-01-07
  • 打赏
  • 举报
回复
method=post
commandio 2004-01-07
  • 打赏
  • 举报
回复
可能填写了一些特殊字符进去了
仙人掌 2004-01-07
  • 打赏
  • 举报
回复
<form action="Copost.asp" >
<textarea name="content" cols="80" rows="12" class="Input" ></textarea>
<br></br>
<input type="submit" value="提交" id=submit12 name=submit1 border=0 valign="middle" class="btn">
</form>

所在页面中就只有这一点代码吗?
如果是没反应应该就是没有提交
你把javascript的判断代码帖出来
yangsm 2004-01-07
  • 打赏
  • 举报
回复
msg.content 没有存进去呀!
My_first 2004-01-07
  • 打赏
  • 举报
回复
msg.content = left(Request("content"),CommentSize2)

改为msg.content = Request("content")
My_first 2004-01-07
  • 打赏
  • 举报
回复
Copost.asp内容如下

<!-- #include file ="common.asp" -->

<%Dim msgid,rs,name,content,uinfo,forumid,limittimes
dim DB,info,msg
set DB = new CDB
set uinfo = DB.GetCurUserInfo
if uinfo.userid = "" then
showerr "用户没有登录!"
end if


set info = new Cforum
set msg = new messageinfo
msg.subject = request("subject")s
msg.parentid = request("parentid")
msg.forumid =request("forumid")
msg.limittimes =request("limittimes")
msg.content = left(Request("content"),CommentSize2)


if msg.subject = "" then
ShowError "主题不能为空!"
end if


if msg.content = "" then
ShowError "详细介绍内容不能为空!"
end if

forumid=msg.forumid
if msg.parentid = "" then
msg.parentid = 0
end if
msg.lastupdate = now
msg.userid = uinfo.userid
msg.username = uinfo.username
info.postmessage2 msg
if msg.parentid = 0 then
response.redirect "Co.asp?id="&forumid
else
response.redirect Request.ServerVariables("HTTP_REFERER")
end if
set DB = nothing
set info = nothing
set uinfo = nothing
set msg = nothing
%>



在我点提交时,好像没有执行copost.asp这个文件, 一点动静都没有,内容好像太多了。

当去掉剩下一小部分内容时,就可以提交了,


还有
xieyj(Free Fish),提到的一些特殊字符,需要怎样处理。 (不应该处理这些字符呀,)


leiaming 2004-01-07
  • 打赏
  • 举报
回复
<textarea></textarea> 这个控件,可以填写无限大
mudsong 2004-01-07
  • 打赏
  • 举报
回复
不可能吧,应该可以提交的
提交表单的处理页面代码是什么样的?
xieyj 2004-01-07
  • 打赏
  • 举报
回复
是用这个组件,可能填写了一些特殊字符进去了,例单引号,需要在保存时处理一下。
仙人掌 2004-01-07
  • 打赏
  • 举报
回复
应是Copost.asp中有问题

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧