0

I have very little knowledge of Visual Basic 2008 express (not the current standard of Visual Basic.NET I believe) (I normally code in C/C++) but my boss gave me a program to debug, where the error of the program is simply put that the (string) input caps out at 1,000,000 characters, and they need it to go beyond that.

How would I go about doing this? At first I thought it was as simple as declaring the variable to be a larger variable type (i.e. changing int to long), but I'm not sure if that would fix this issue as it is a string a not a decimal variable type.

So if 1,000,000 characters happens to be the practical limit (not theoretical) of input into a string variable in Visual Basic, is there any clever way to circumvent this?

MPelletier
  • 16,256
  • 15
  • 86
  • 137
  • Read about the maximum string length here http://stackoverflow.com/questions/140468/what-is-the-maximum-possible-length-of-a-net-string – Steve Feb 13 '13 at 21:13
  • I've read that post and found it informative, however does that apply to visual basic 2008 express? i'm told it's different from the current visual basic.net standard, and although that post is very informative, is there anyway to go about circumventing that limit or reaching that limit? because for practical purposes it appears my program keeps capping out at 1 million characters.. Thank you for your promptness! – Isaac Haddy Feb 13 '13 at 21:21
  • 1
    If you know the variable name and where it is updated you could try to substitute it with a [StringBuilder() class](http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx) – Steve Feb 13 '13 at 21:23
  • Would this input happen to be related to a file upload in ASP.NET? – Andrew Morton Feb 13 '13 at 22:49

0 Answers0