Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB String Limitation

Status
Not open for further replies.

jojo11

Programmer
Feb 2, 2003
189
0
0
US
I am getting html source and pulling into VB. The pages average 160000 characters and the string data type only allows around 60000 characters. It is forcing me to store the data on the clipboard. Is there a better option?
 
The clipboard is probably a bad place since the user could easily, inadvertantly, replace the clipboard.
What are you trying to do here?
You could probably parse through the html page and place it into an array piece by piece.
 
You could "loadfile" it into a richtextbox if you're deperate enough.

-SE
 
Er...a VB variable-length string can hold 2^31 characters
 
It's probably a limitation of my system, but I can get a 2^27 length string before running out of string space. However that's still 134,217,728 characters!


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Windows is kind enough to give you 4GB of process memory of which you yourself may use 2GB (playing around with some settings in Windows NT or 2000 can make that 3, but I can't remember how...) and the system takes the rest.

Your strings consist of 2 bytes each character. With a little calculation you can figure out how long your strings can theoratically be. There's one huge pitfall though: It can not be larger than the largest block of unfragmented memory. Which is why you'll never get the length you've calculated you would be able to get...


Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top