怎样传送更多的数据在表单中

2016-01-29 18:29 1 1 收藏

怎样传送更多的数据在表单中,怎样传送更多的数据在表单中

【 tulaoshi.com - ASP 】

  request对象限制102,399 bytes..
When you post a large form field, you may receive the following error message:

Error Type:
Request object, ASP 0107 (0x80004005)
The data being processed is over the allowed limit.

In Microsoft Internet Information Server (IIS) 4.0, you may receive the following error message:
Request object error 'ASP 0107 : 80004005'
Stack Overflow
/projectname/page.asp, line XX
The data being processed is over the allowed limit.


CAUSE
The size limit of each form field that is retrieved in the Request object is 102,399 bytes. The error
occurs when you exceed this limit.


RESOLUTION
To resolve this problem, use one of the following methods:

Instead of reading form variable values with the Request.Form collection, use Request.BinaryRead
(Request.TotalBytes), and parse the form values from the output of Request.BinaryRead.


Use a File Upload scheme, such as Microsoft Posting Acceptor.


Break the HTML form variables into multiple form variables before you submit the form. The 102,399 byte
limit is for each form variable, so you can have multiple form variables of 102,399 characters or less.
The following sample code illustrates this:
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this
code "as is" without warranty of any kind, either express or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular purpose.

<FORM method=post action=LargePost.asp name=theForm onsubmit="BreakItUp()"
<Textarea rows=3 cols=100 name=BigTextAreaA bunch of text...</Textarea
<input type=submit value=go
</form

<SCRIPT Language=JavaScript
function BreakItUp()
{
//Set the limit for field size.
var FormLimit = 102399

//Get the value of the large input object.
var TempVar = new String
TempVar = document.theForm.BigTextArea.value

//If the length of the object is greater than the limit, break it
//into multiple objects.
if (TempVar.length FormLimit)
{
document.theForm.BigTextArea.value = TempVar.substr(0, FormLimit)
TempVar = TempVar.substr(FormLimit)

while (TempVar.length 0)
{
var objTEXTAREA = document.createElement("TEXTAREA")
objTEXTAREA.name = "BigTextArea"
objTEXTAREA.value = TempVar.substr(0, FormLimit)
document.theForm.appendChild(objTEXTAREA)

TempVar = TempVar.substr(FormLimit)
}
}
}
</SCRIPT
The receiving Active Server Page (ASP) page reconstructs the variable:
<%
Dim BigTextArea

For I = 1 To Request.Form("BigTextArea").Count
BigTextArea = BigTextArea & Request.Form("BigTextArea")(I)
Next
%
 

来源:https://www.tulaoshi.com/n/20160129/1505999.html

延伸阅读
标签: Java JAVA基础
来源:LoveJSP.site 在Web程序设计中,处理表单提交的数据是获取Web数据的主要方法,今天,我们来看一看Servlet中是怎样处理来自表单的数据的。 表单数据的提交方法有两种Post方法和Get方法,当使用Post方法时,数据由标准的输入设备读入,当使用Get方法时,数据由CGI变量QUERY_STRING传递给表单数据处理程序。 Servlet会自动将以上两种方法...
    为了测试我的一个业务系统在不同数据库上的表现,我的tomcat上配置了多个数据源,这样我可以轻松的切换系统到不同的数据源上。为了监测每个数据源的运行状况,随时观测执行的sql语句,我为每个数据源都配置了JDBMonitor,并且这些数据源的JDBMonitor的配置文件共用一个config.xml文件。     但是在...
在Internet上运作数据库经常会有这样的需求:把遍布全国各城市相似的数据库应用统一起来,一个节点的数据改变不仅体现在本地,还反映到远端。复制技术给用户提供了一种快速访问共享数据的办法。 一、实现数据库复制的前提条件 1、数据库支持高级复制功能 您可以用system身份登录数据库,查看v$option视图,如果其中Advanced...
简介 众所周知,JDBC(Java数据库连接)是Java 2企业版的重要组成部分。它是基于SQL层的API。通过把SQL语句嵌入JDBC接口的方法中,用户可以通过Java程序执行几乎所有的数据库操作。JDBC只提供了接口,具体的类的实现要求数据库的设计者完成。 !-- frame contents --!-- /frame contents -- 通过生成这些接口的实例,...
标签: vb
  如果您在Access数据库、Access项目中删除数据或对象,可能会产生碎片并导致磁盘空间使用效率的降低。同时,数据库文件的大小并未减小,而是不断的增大,直至您的硬盘没有空间。有没有好的处理方法呢?其实,在Access中可以对数据库进行压缩优化以提升Access数据库和Access项目的性能,这样的压缩处理的实质是复制该文件,并重新组织文件...

经验教程

145

收藏

86
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部