473,789 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP String limit

Jay
I have an HTML form with a textarea. When passing large
amount of data in the textarea, the Processing asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or replace
function is called on the field when long text is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?

Thank you,

Jul 19 '05 #1
6 23082
Jay wrote on 07 sep 2003 in microsoft.publi c.inetserver.as p.general:
I have an HTML form with a textarea. When passing large
amount of data in the textarea, the Processing asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or replace
function is called on the field when long text is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?


If it is an ASP serverside code problem, post the code.

If not, ask a clientside NG.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Jay
The problem is when I call the following function that I
have created:

Function Clean(InString)

Clean=Replace(T RIM(InString), "'", "''", 1, -1, 1)

End Function

The function works well if the data passed is "small".
However when I pass larger values I get the exception. I
think larger is more than 5000 char. I have not yet
tested for the max number of char that I can pass.

I'm using Windows XP with IIS ver 5.1
Your help is highly appreciated.

Thank you,
Jay

-----Original Message-----
Jay wrote on 07 sep 2003 in microsoft.publi c.inetserver.as p.general:
I have an HTML form with a textarea. When passing large amount of data in the textarea, the Processing asp pages catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or replace function is called on the field when long text is passed in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?


If it is an ASP serverside code problem, post the code.

If not, ask a clientside NG.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.

Jul 19 '05 #3
Jay
The problem is when I call the following function that I
have created:

Function Clean(InString)

Clean=Replace(T RIM(InString), "'", "''", 1, -1, 1)

End Function

The function works well if the data passed is "small".
However when I pass larger values I get the exception. I
think larger is more than 5000 char. I have not yet
tested for the max number of char that I can pass.

I'm using Windows XP with IIS ver 5.1
Your help is highly appreciated.

Thank you,
Jay
-----Original Message-----
I have an HTML form with a textarea. When passing large
amount of data in the textarea, the Processing asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or replacefunction is called on the field when long text is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?

Thank you,

.

Jul 19 '05 #4
Jay wrote on 07 sep 2003 in microsoft.publi c.inetserver.as p.general:
Evertjan wrote
Jay wrote on 07 sep 2003 in
I have an HTML form with a textarea.
When passing large
amount of data in the textarea, the Processing
asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or
length or replace
function is called on the field when long text
is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?

If it is an ASP serverside code problem, post the code.
If not, ask a clientside NG.

The problem is when I call the following function that I
have created:

Function Clean(InString)
Clean=Replace(T RIM(InString), "'", "''", 1, -1, 1)
End Function

The function works well if the data passed is "small".
However when I pass larger values I get the exception. I
think larger is more than 5000 char. I have not yet
tested for the max number of char that I can pass.

I'm using Windows XP with IIS ver 5.1


[please do not underquote]

An interesting question.

============

1
Since we are now on a ASP Newsgroup(NG) I surmize you are using
serverside ASP VBscript.

So the content of the Instring has to be brought from somware. If itis
passed from a form/get the maximum is 4000 chars, I think, if it is a
form/post the maximum could be 5000, I wouldn't know.

Perhaps that is the error bug.

=============== =

2
You could always use a brute force equivalent of your function for
testing if the error is in your function:

Function Clean(InString)
InString = trim(InString)
clean = ""
for i=1 to len(InString)
clean = clean + mid(InString,i, 1)
if mid(InString,i, 1)="'" then clean = clean + "'"
next
End Function

slow, but reliable [I hope, not tested]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5
102,399

http://support.microsoft.com/default...NoWebContent=1

Although I don't think you are getting to that high of a number

I have used a similar function to your "Clean" with content up to 102,399
characters, without difficulty.
"Jay" <ar******@hotma il.com> wrote in message
news:3e******** *************** *****@phx.gbl.. .
The problem is when I call the following function that I
have created:

Function Clean(InString)

Clean=Replace(T RIM(InString), "'", "''", 1, -1, 1)

End Function

The function works well if the data passed is "small".
However when I pass larger values I get the exception. I
think larger is more than 5000 char. I have not yet
tested for the max number of char that I can pass.

I'm using Windows XP with IIS ver 5.1
Your help is highly appreciated.

Thank you,
Jay
-----Original Message-----
I have an HTML form with a textarea. When passing large
amount of data in the textarea, the Processing asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or

replace
function is called on the field when long text is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?

Thank you,

.

Jul 19 '05 #6
"Jay" <ar******@hotma il.com> wrote in message
news:3d******** *************** *****@phx.gbl.. .
I have an HTML form with a textarea. When passing large
amount of data in the textarea, the Processing asp pages
catch an error message as follows:
Error Type:
(0x80020009)
Exception occurred.

The error is generated once the trim or length or replace
function is called on the field when long text is passed
in the textarea.
Is there a max limit on the string length that these
functions can process?
What else can be done to done to fix this problem?

Thank you,

The solution is quite simple.
Don't use Replace :)

Imagine I have a HTML form,
I would just fetch the data and store it in SQL using a parameter

--- this line is convenient in Global.asa
<!-- METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library"
TYPE="TypeLib"
UUID="{00000205-0000-0010-8000-00AA006D2EA4}" -->

Set cmd = CreateObject("A DOB.Command")
cmd.commandtype = adCmdText
cmd.commandtext = "INSERT INTO myTable (myBIGTEXT) VALUES(?)"
Set cmd.activeconne ction = conn
cmd.Parameters. append cmd.createparam eter(, adLongVarWChar, , 10000,
MyValue) ' or adLongVarChar if you don't use unicode texts...
cmd.execute , , adExecuteNoReco rds

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
129236
by: Wade G. Pemberton | last post by:
Can't find it quickly in the reference books.
8
4733
by: Hal Vaughan | last post by:
Is there a maximum length for Javascript program lines? What about strings? Is there a limit on string length? I found some references that said the maximum string length was 256 characters, but I have a program that created a string of over 25,000 characters (the browser was Konqueror). Are there limits on these lengths? If I require a newer browser for the program I'm writing, would that change the situation?
15
2027
by: Andrew Brampton | last post by:
Hi, I'm new to using std classes, but I was wondering how I could do the following efficiently with the string class: Say I had a string with delimited values such as: "field1,field2,field3,field4" and I wanted to to place those 4 fields into different variables I would do something like: /* Note code quickly pulled from my head - may be wrong :) */
1
6360
by: Alan J. Flavell | last post by:
What are the theoretical and practical limits on the length of a GET query string, currently? Strange to say, I found this rather simple question hard to answer, possibly because of searching the wrong terms, or, rather, because the terms ("get", "form", "length" etc.) are so common as to be useless for searching. An email correspondent assures me that there's an RFC which limits the length of a URI, including query string, to 1024...
5
2478
by: Sehboo | last post by:
Hi, Is there any easy way to limit the size of the string? I have Private msDescription As String I want to limit the msDescription to 50 instead of unlimitted.
53
4095
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
2
22278
by: Daniel | last post by:
c# string size limit? length of string limit?
1
3392
by: Daniel | last post by:
is there any limit to how long of a string SqlDataReader.GetString() can return?
8
8318
by: tshad | last post by:
Is there a string limit is C#? I have a Textbox that I am allowing users to paste into (can be a word document). But I am finding that I am losing data when I write large files to my Sql Server database. The fields is set to text. The data is kept in an object in a "string" variable when I am moving from asp.net page to page. One example had the data at 23k, but when I got the data back, it only have
3
7421
by: ipellew | last post by:
Hi; Whats the maximum string length in Javascript. Is it the same across all the browsers? max_s_len = str.length // what the max number of chars we can have is str? Regards
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.