File size
File size
File size
File size
File size
File size File size File size File size File size File size File size File size
File size File size
File size
Go Back  Xtreme Visual Basic Talk > > > File size


Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2010, 10:40 AM
heilla heilla is offline
Newcomer
 
Join Date: Sep 2010
Posts: 5
Default File size


Hey guys,

my question is the following:

i am writing with WriteLine command to an external file
and it does write but for some reason it stops writing at 4,00KB(4,096B)
is there a limit to how big these files can get?
thanks in advance

Wesley
Reply With Quote
  #2  
Old 09-14-2010, 10:49 AM
Gruff's Avatar
GruffFile size Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Do you get an error?
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #3  
Old 09-14-2010, 10:53 AM
heilla heilla is offline
Newcomer
 
Join Date: Sep 2010
Posts: 5
Default

No, but i'm certain it executes the code because i run it step by step
Reply With Quote
  #4  
Old 09-14-2010, 11:22 AM
PlausiblyDamp's Avatar
PlausiblyDampFile size PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

What type of file system is in use on the device you are writing to? FAT32 is limited to 4GB per file IIRC, NTFS doesn't have the same limitation though.

If you are saving to something like a USB stick then they will often be FAT32
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 09-14-2010, 11:27 AM
heilla heilla is offline
Newcomer
 
Join Date: Sep 2010
Posts: 5
Default

Just an NTFS HDD and then still 4gb is allot more then what i'm trying to do
Reply With Quote
  #6  
Old 09-14-2010, 11:44 AM
PlausiblyDamp's Avatar
PlausiblyDampFile size PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

My fault, I misread your original post.

Is there any chance you could post the relevant code here? Having the code to look at makes it far easier to diagnose problems..
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #7  
Old 09-14-2010, 11:50 AM
heilla heilla is offline
Newcomer
 
Join Date: Sep 2010
Posts: 5
Default

Certainly
it is a rather long code tho so i put it in a txt attachment

the code fails at panel30
Attached Files
File Type: txt upload.txt (13.2 KB, 10 views)
Reply With Quote
  #8  
Old 09-14-2010, 01:19 PM
AtmaWeapon's Avatar
AtmaWeaponFile size AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

I can't let the code slip by without commenting on a few things, but first I'll focus on the problem.

I don't have a good explanation for why you wouldn't have all of the data you expect. I've written plenty of files that are much larger than 4KB, so I know this isn't a limitation of the StreamWriter class. How are you verifying that there is not enough data in the file? Since the format is a lot of "1" or "0"s, one per line, I can only assume that you verify by reading the file and setting checkboxes somehow. Maybe all of the data is in the code that reads, and the writing code is OK? Here's my justification.

4KB is 4,096 bytes. By default, .NET will encode text as UTF-8, which for the characters 0 and 1 will use 1 byte per character, followed by a CR and LF: 3 bytes per line. So to reach 4,096 bytes, you'd need to write 4096 / 3 = ~1,366 lines for that many checkboxes. I don't buy that you can manually verify that.

That is a ton of checkboxes; even with 32 panels that's ~42 checkboxes per panel. That's not an unreasonable number for a few applications, but multiplied by 32 it's hard to fathom a design where this is sane. Does the form start up slow? If you really need that many checkboxes, you should really consider more of a composite UI where you dynamically load them as needed as opposed to using that many controls.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #9  
Old 09-14-2010, 01:56 PM
heilla heilla is offline
Newcomer
 
Join Date: Sep 2010
Posts: 5
Default

i verify it by checking the last 3 rows of checkboxes (panel 30-32) and then looking into the output file, searching for 1's, then paused the code at the lines where it should put in the 1 and it runs through it but doesn't write it in the output file. And yes the form does start slow.

i also included the whole source code as it might be easier

thanks so much for the help

This is the form itself
Attached Images
File Type: png naamlooshw.png (216.6 KB, 14 views)
Attached Files
File Type: txt upload.txt (37.3 KB, 9 views)

Last edited by Flyguy; 09-15-2010 at 01:04 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
File size
File size
File size File size
File size
File size
File size File size File size File size File size File size File size
File size
File size
 
File size
File size
 
-->