Very large string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terry Olsen

    #1

    Very large string

    I'm reading the response to the DOS "FIND" command into a string. Until
    now it has worked just fine. Now it's returning so much data that the
    string seems to be full. Here's a snippet of the last few lines:

    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22845 .XML: 0
    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22851 .XML: 0
    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\

    How much can a string hold? Will a StringBuilder hold more? How would I
    use a string builder in this case?

    Thanks.

    *** Sent via Developersdex http://www.developersdex.com ***
  • GhostInAK

    #2
    Re: Very large string

    Hello Terry,

    Speaking out my ass here, so be sure to research what I say.. But I believe
    the string data type is limited in capacity only by the amount of available
    memory. However, strings are immutable.. so modifying them, especially large
    ones, is quite expensive. A string builder will certainly increase the speed
    with wich you can modify strign contents.

    Looking up string builder in the MSDN docs will get you started in their use.

    -Boo
    I'm reading the response to the DOS "FIND" command into a string.
    Until now it has worked just fine. Now it's returning so much data
    that the string seems to be full. Here's a snippet of the last few
    lines:
    >
    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22845 .XML: 0
    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22851 .XML: 0
    ---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\
    >
    How much can a string hold? Will a StringBuilder hold more? How would
    I use a string builder in this case?
    >
    Thanks.
    >
    *** Sent via Developersdex http://www.developersdex.com ***
    >

    Comment

    • Branco Medeiros

      #3
      Re: Very large string


      Terry Olsen wrote:
      I'm reading the response to the DOS "FIND" command into a string. Until
      now it has worked just fine. Now it's returning so much data that the
      string seems to be full. Here's a snippet of the last few lines:
      <snip>

      How do you build the string?

      Regards,

      Branco.

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: Very large string

        As addition to Boo,

        And therefore will a sentence as

        A = A

        Direct a memory overflow as A is longer than half of the memorysize (as long
        as this inside the 2Gb area of course in 32Bit systems).

        Just something I was thinking of reading Boo's message.

        Cor

        "GhostInAK" <ghostinak@gmai l.comschreef in bericht
        news:c71747b42c d298c8910b6c1ba 5f6@news.micros oft.com...
        Hello Terry,
        >
        Speaking out my ass here, so be sure to research what I say.. But I
        believe the string data type is limited in capacity only by the amount of
        available memory. However, strings are immutable.. so modifying them,
        especially large ones, is quite expensive. A string builder will
        certainly increase the speed with wich you can modify strign contents.
        >
        Looking up string builder in the MSDN docs will get you started in their
        use.
        >
        -Boo
        >
        >I'm reading the response to the DOS "FIND" command into a string.
        >Until now it has worked just fine. Now it's returning so much data
        >that the string seems to be full. Here's a snippet of the last few
        >lines:
        >>
        >---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22845 .XML: 0
        >---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\DATA\BEX22851 .XML: 0
        >---------- C:\PROGRA~1\VER ITAS\BACKUP~1\N T\
        >>
        >How much can a string hold? Will a StringBuilder hold more? How would
        >I use a string builder in this case?
        >>
        >Thanks.
        >>
        >*** Sent via Developersdex http://www.developersdex.com ***
        >>
        >
        >

        Comment

        • Terry Olsen

          #5
          Re: Very large string

          Using the Tivoli RemoteExec service on the remote server. I connect via TCP,
          send the DOS command, and the response is returned. Like so:

          dim str as string
          str = RmtExec.Send("F IND /C /I "Text to find" c:\directory\*. xml)


          "Branco Medeiros" <branco.medeiro s@gmail.comwrot e in message
          news:1155954827 .721199.191970@ m73g2000cwd.goo glegroups.com.. .
          >
          Terry Olsen wrote:
          >I'm reading the response to the DOS "FIND" command into a string. Until
          >now it has worked just fine. Now it's returning so much data that the
          >string seems to be full. Here's a snippet of the last few lines:
          <snip>
          >
          How do you build the string?
          >
          Regards,
          >
          Branco.
          >

          Comment

          Working...