473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 23026
Jay wrote on 07 sep 2003 in microsoft.public.inetserver.asp.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(TRIM(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.public.inetserver.asp.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(TRIM(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.public.inetserver.asp.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(TRIM(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******@hotmail.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(TRIM(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******@hotmail.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("ADOB.Command")
cmd.commandtype = adCmdText
cmd.commandtext = "INSERT INTO myTable (myBIGTEXT) VALUES(?)"
Set cmd.activeconnection = conn
cmd.Parameters.append cmd.createparameter(, adLongVarWChar, , 10000,
MyValue) ' or adLongVarChar if you don't use unicode texts...
cmd.execute , , adExecuteNoRecords

Jul 19 '05 #7

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

Similar topics

5
by: Wade G. Pemberton | last post by:
Can't find it quickly in the reference books.
8
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,...
15
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:...
1
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...
5
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
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
by: Daniel | last post by:
c# string size limit? length of string limit?
1
by: Daniel | last post by:
is there any limit to how long of a string SqlDataReader.GetString() can return?
8
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...
3
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.