Very large string

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

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\VERITAS\BACKUP~1\NT\DATA\BEX22845.XML: 0
---------- C:\PROGRA~1\VERITAS\BACKUP~1\NT\DATA\BEX22851.XML: 0
---------- C:\PROGRA~1\VERITAS\BACKUP~1\NT\

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

Thanks.
 
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
 
Terry said:
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.
 
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
 
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("FIND /C /I "Text to find" c:\directory\*.xml)
 
Back
Top