StreamWriter 4096 byte limit 
Author Message
 StreamWriter 4096 byte limit

I'm building a string of 4800 bytes and then passing it to StreamWriter to
write to file.  The file is being truncated at 4096 bytes.  Is there a way
around this?

Dim strOutput As String
Dim swOutput As StreamWriter
strOutput = BuildString()

swOutput = New StreamWriter(File.Create(FileOut))
swOutput.Write(strOutput)

Chris



Tue, 01 Feb 2005 08:50:36 GMT  
 StreamWriter 4096 byte limit
Hi, Chris

Have you tried swOutput.Flush() at the end? It might solve the problem.

Hope that help.

--
HuyN - VB .NET team.
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> I'm building a string of 4800 bytes and then passing it to StreamWriter to
> write to file.  The file is being truncated at 4096 bytes.  Is there a way
> around this?

> Dim strOutput As String
> Dim swOutput As StreamWriter
> strOutput = BuildString()

> swOutput = New StreamWriter(File.Create(FileOut))
> swOutput.Write(strOutput)

> Chris



Tue, 01 Feb 2005 09:04:52 GMT  
 StreamWriter 4096 byte limit


Quote:
> Hi, Chris

> Have you tried swOutput.Flush() at the end? It might solve the problem.

> Hope that help.

> --
> HuyN - VB .NET team.

Thanks, that did it.


Tue, 01 Feb 2005 09:23:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. detect conflict messages - runtime error 4096

2. error 4096???

3. VB5 winsock-control GetDataMax=4096

4. Call C-DLL function with 4096 bytes long terminated string etc. etc.

5. VB5, Inet1.OpenURL limited to 65536 bytes?

6. SMTP Control and 8,000 or so byte limit???

7. help with formula fields and 254 byte limit

8. Limit of number of bytes read from a file

9. Need to convert a 16 byte array of bytes to 4 byte integer

10. 4096 * 8 means overflow !!!! how come?

11. question about streamwriter

12. StreamWriter

 

 
Powered by phpBB® Forum Software