473,385 Members | 1,474 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,385 software developers and data experts.

Working with a giant quantity of characters

28
Hi Guys !!

I have something like this, inside a loop:

Expand|Select|Wrap|Line Numbers
  1. Dim strContentHolder     As String
  2. Dim strIncomingContent   As String
  3. strContentHolder = strContentHolder + strIncomingContent
Let's talk about the problem I'm facing:
As the title says, the strContentHolder that is inside a loop, so the code above will happens a lot of times, like 200x or more... So the memory consumed will be too much, and the error will happen, Out Of String Space.

I tried to download and use csStringBuilder, an implemented class that would work like StringBuilder, but the error still happening. So I'd like to ask you guys, what could I do to work arround this ? I tried to work more than one string, like, strContentHolder2 strContentHolder3 [...]. But it was too much content u.u
Aug 30 '13 #1
1 1174
Killer42
8,435 Expert 8TB
There are a few things you might consider. For example...
  • The scope of the variables. I've had cases where changing something from private (module/form) scope to public, or possibly the other way around, got around a similar limitation.
  • According to this MS page, you should try assigning to a variable with a different name. And then assigning back to the original variable, I guess (though they don't say that). However, from what you said about trying multiple variables, this might not work.
  • It might not be a string space problem at all. It probably is, of course. But according to one of the responses in this thread it could be something else masquerading as a string space error. Just how "giant" are we talking about here?
  • Could you build a byte array rather than a string? Depending on what you want to do with it, this may not be convenient. On the other hand, it might work.
  • Must you keep it all in memory? What about writing the text out to a file, and retrieving it as needed? After all, no matter how clever you get with the code, memory is not infinite - it will fill up eventually.
Sep 3 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tim Mickelson | last post by:
Hi I thought that working with swedish characters would be easy, but since I'm working with MySQL 4.1 that's not the case any more. First thing I noticed (emditly) was an application that I've...
13
by: Rick Brandt | last post by:
If you examine the complete XML below you will see an element "Notes" consisting of... <Notes>test replace test&amp;replace</Notes> As you can see I have properly (I think) escaped the ampersand...
18
by: LarsM | last post by:
Hi all, I am new to XML, but I use it for an RSS feed. I have one problem, which I have really been struggling with. My XML document is generated from the contents of a MySQL database. It is...
2
by: Cesar Ronchese | last post by:
Hello, All! I'm working with accentuated characters in my XML files, and I have found problems to load and save it. First, for this case, I always have my XML in memory, and I load it via...
0
by: Viorel | last post by:
Working as a beginner with data objects in Visual Studio 2003 and C#, I use the "Generate Dataset" command in order to generate automatically the dataset objects based on data adapters. Generated...
1
by: Joe | last post by:
Can someone look at this code and tell me why I can not read in the input characters. //Invoice.hpp file #include <iostream> #include <string.h> using namespace std;
7
chunk1978
by: chunk1978 | last post by:
i though i had this under control, but i'm completely lost... i have a form which allows a user to fill out information, which is then emailed to myself as well as themselves... the form is...
5
by: Figmo | last post by:
I'm having a problem working with foreign characters (well....foreign to me anyway) I have a textbox control on a form. The font is set to MS Arial Unicode. If I use the Chinese input method...
5
by: prathapavp | last post by:
hi all, We r working on ERP sys and am doing crossBrowser compatibility. The problem is am not able to load one function by onClicking the refrence text . could u please help me out.
0
by: hannoudw | last post by:
hi i'm working on these tables database (for shoes) --------- item_size(Article,size,stock,quantity) item(Article,stock,price,st_q1,st_q2,st_q3,...,st_q10, code_supplier)...
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.