473,397 Members | 2,077 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,397 software developers and data experts.

Replace function - error 80020009

Hello,

I try to use the replace function with a very long text and I have this
error :

error '80020009'
Exception occurred.

Do you have any idee to resolve this problem ?
Thanks

Oct 20 '05 #1
6 3064
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz.net> wrote in message
news:wD********************@news20.bellglobal.com. ..
Hello,

I try to use the replace function with a very long text and I have this
error :

error '80020009'
Exception occurred.

Do you have any idee to resolve this problem ?
Thanks

Oct 20 '05 #2
I've just use the replace function. If the text is too long, I have the
error but if I cut the text, I don't have any error.

montexte= Replace( montexte, "'", "''" )
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> a écrit dans
le message de news: #J*************@TK2MSFTNGP12.phx.gbl...
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz.net> wrote in message
news:wD********************@news20.bellglobal.com. ..
Hello,

I try to use the replace function with a very long text and I have this
error :

error '80020009'
Exception occurred.

Do you have any idee to resolve this problem ?
Thanks


Oct 20 '05 #3

Séverine Donnay wrote:
I've just use the replace function. If the text is too long, I have the
error but if I cut the text, I don't have any error.

montexte= Replace( montexte, "'", "''" )


What's the length of the text when there's an error?

Oct 20 '05 #4
146 800

<la**********@yahoo.com> a écrit dans le message de news:
11**********************@g14g2000cwa.googlegroups. com...

Séverine Donnay wrote:
I've just use the replace function. If the text is too long, I have the
error but if I cut the text, I don't have any error.

montexte= Replace( montexte, "'", "''" )


What's the length of the text when there's an error?
Oct 20 '05 #5
I've never run into this, so all I can suggest is that you handle the text
in chunks:

dim strlen,ar(),chunk, i
strlen=len(montexte)
if strlen >= <size that causes the error> then
chunk=2000
redim ar(strlen\chunk+ 1)
for i = 0 to ubound(ar)
ar(i)=replace(mid(montexte,i*chunk + 1,chunk),"'","''") next
else
montexte= Replace( montexte, "'", "''" )
end if

It looks like you are processing this string to use it in a dynamic sql
statement. You can avoid this processing by using parameters:
http://groups-beta.google.com/group/...e36562fee7804e

Bob Barrows

Séverine Donnay wrote:
I've just use the replace function. If the text is too long, I have
the error but if I cut the text, I don't have any error.

montexte= Replace( montexte, "'", "''" )
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> a
écrit dans le message de news: #J*************@TK2MSFTNGP12.phx.gbl...
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz.net> wrote in message
news:wD********************@news20.bellglobal.com. ..
Hello,

I try to use the replace function with a very long text and I have
this error :

error '80020009'
Exception occurred.

Do you have any idee to resolve this problem ?
Thanks


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Oct 20 '05 #6
Bob Barrows [MVP] wrote:
I've never run into this, so all I can suggest is that you handle the
text in chunks:

dim strlen,ar(),chunk, i
strlen=len(montexte)
if strlen >= <size that causes the error> then
chunk=2000
redim ar(strlen\chunk+ 1)
for i = 0 to ubound(ar)
ar(i)=replace(mid(montexte,i*chunk + 1,chunk),"'","''")
next
oops, I forgot the join statement to put the string back together:
montexte=join(ar,"")
else
montexte= Replace( montexte, "'", "''" )
end if


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Oct 20 '05 #7

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

Similar topics

0
by: olivier Micheli | last post by:
Hello, I need help When I execute the following asp, I have the error message: ------------------------------- ADODB.Field error '80020009' BOF ou EOF est égal à True ou l'enregistrement...
0
by: M Naeem Baig | last post by:
I have the following asp code running well on win 2000 (sp4 installed). But the same code on windows 2003 is giving error '80020009'. Dim Conn, strRS, RS, strConn Set Conn =...
5
by: Mark | last post by:
All across my site i am getting 0x80020009 errors every so often. they point to lines of code like where FolderNAMEIN is a string such as "Botswana" and the VarFolderNameLength is 150 if...
1
by: Chris | last post by:
I get the follow error on a linux box that is running sun asp: CDONTS.NewMail.1 error '80020009' unable to connect to server The error occurs when the Send Command is Executed. Here is my code...
2
by: dmiller23462 | last post by:
Hey guys, I'm back again....I've got the results displaying that I wanted but instead of having a "next" or "previous" link displayed I am getting the error msg below (I actually get the data that...
2
by: SayMyName | last post by:
Due to my browser being danishm the error message will not mean much t most of you. It is an "Unspecified problem" with "Provide (0x80004005)" POST Data: error '80020009' The error only arrives...
4
by: peashoe | last post by:
I get the following error: ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. This is my code: ' Get...
3
by: Aaron | last post by:
I have been searching the boards trying to find an answer to this question and no luck. I am using a query similar to this: Select count(col1) from table1 I was having a hard time accessing...
1
by: HotKgon | last post by:
When I try and run a code, I get: Run-time Error '-2147352567 (80020009)': The data has been changed. My code is: Dim rsSF12 As DAO.Recordset Dim SF12Score As Double
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.