Results 1 to 5 of 5

Thread: Variable length Strings

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    11
    I need to use a public variable length string (up to about a million characters long), but whenever I fill it past the fixed-length limit (68k characters), VB crashes. Any advice?

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    East Anglia, England
    Posts
    73
    Hello,
    I have a few suggestions that may/may not help.
    How about trying to create an array of variable length strings, once you have reach the limit on one of the strings move over to the next string.

    You could try writing the data to some control like a rich text box which I beleive has a much much higher charater limit that an ordinary string.

    How about storing some of the string in a file and just use that like a ordinary string.

    Anyway I'm out of ideas, hope some of them help you,
    Desire.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Just a comment: Richtextboxes use variable-length String, not fixed length. How did you declare your string?

    Dim a as String (variable-length) 10 bytes + string length 0 to approximately 2 billion
    Dim a as String*65535 (fixed-length) Length of string 1 to approximately 65,400

  4. #4
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Text boxes are limited to 64K. Search MSDN for "Control Limitations"

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    11
    That's why. I was putting it into a regular textbox. Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width