473,804 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3085
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz .net> wrote in message
news:wD******** ************@ne ws20.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.p hx.gbl...
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz .net> wrote in message
news:wD******** ************@ne ws20.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**********@y ahoo.com> a écrit dans le message de news:
11************* *********@g14g2 00...legr oups.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(),chu nk, i
strlen=len(mont exte)
if strlen >= <size that causes the error> then
chunk=2000
redim ar(strlen\chunk + 1)
for i = 0 to ubound(ar)
ar(i)=replace(m id(montexte,i*c hunk + 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.p hx.gbl...
Give the code.

Ray at work

"Séverine Donnay" <sd*****@winooz .net> wrote in message
news:wD******** ************@ne ws20.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(),chu nk, i
strlen=len(mont exte)
if strlen >= <size that causes the error> then
chunk=2000
redim ar(strlen\chunk + 1)
for i = 0 to ubound(ar)
ar(i)=replace(m id(montexte,i*c hunk + 1,chunk),"'","' '")
next
oops, I forgot the join statement to put the string back together:
montexte=join(a r,"")
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
3624
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 actuel a été supprimé.
0
1751
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 = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.Recordset") Conn.Provider = "ADsDSOObject"
5
2436
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 len(FolderNAMEIN) > VarFolderNameLength then and
1
4069
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 Dim objCDO 'CDO object ' Send it to ...
2
6320
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 I'm supposed to get meaning that my query seems to be working fine but instead of making its way to the INCLUDE file (bottom navigation bar) it displays the following error msg instead of the included nav bar... *** error '80020009' Exception...
2
6113
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 with some apperently random files bein uploaded. Please Help
4
10915
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 if module is hand-approved or not. query = "select *, m.Title as ModuleTitle, d.IsRanged, c.IsHandApproved as Approval, c.ApprovalDate as ApprovalDate, ci.InstructorID as UID, i.Email, i.FirstName, i.LastName" _ & " from ModuleTop m" _
3
2486
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 the count information. After reading for a while the following SQL examples were given to correct this issue. Select count(col1) Blah from table1
1
7991
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
9712
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10089
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
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
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
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
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.