Home All Groups Group Topic Archive Search About
Author
18 Aug 2006 11:04 PM
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.

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

Author
19 Aug 2006 2:29 AM
GhostInAK
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

Show quoteHide quote
> 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.
>
> *** Sent via Developersdex http://www.developersdex.com ***
>
Author
19 Aug 2006 5:29 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"GhostInAK" <ghosti***@gmail.com> schreef in bericht
news:c71747b42cd298c8910b6c1ba5f6@news.microsoft.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\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.
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
>>
>
>
Author
19 Aug 2006 2:33 AM
Branco Medeiros
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.
Author
19 Aug 2006 5:34 AM
Terry Olsen
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)


Show quoteHide quote
"Branco Medeiros" <branco.medei***@gmail.com> wrote in message
news:1155954827.721199.191970@m73g2000cwd.googlegroups.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.
>