Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can’t   write   huge data to text files Using VB .

Posted on 2004-09-20
5
Medium Priority
?
266 Views
Last Modified: 2006-11-17
Dear Experts
In my VB application I m downloading sales data  to  text files .
I have problem with  writing in  text files  which stored only a specific amount of data  
Is there any restriction on writing  number of bytes to text files ? If yes then how I should resolve this problem .
Awaiting for  your reply.

0
Comment
Question by:rehman123
5 Comments
 
LVL 1

Accepted Solution

by:
anupbhunia earned 1500 total points
ID: 12102735
Dear Friend,

As i know there is no restriction in text file size.

are you concating the text in string variable? or are you keeping the text in any textBox control before writing to the text file? If you did, change logic. Apped to the text file directly.

Dim fs As FileSystemObject
Dim fst As TextStream
Set fst = fs.OpenTextFile("YourFile", ForAppending)

Do
   fst.Write YourText$
loop
0
 
LVL 13

Expert Comment

by:bochgoch
ID: 12103438
There are no restrictions -- check your diskspace / operating system permissions...

Please let us see the code that you're using to write to file.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12103841
rehman123,

My suggestion is: Save your data to a Richtext file. It isn't much difficult to do so, nor will you need to make many change in your code. Use RichTextBox activex control to do that. With RTB you can store large amounts of data which is not possible with plain TextBox.
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 12104283
Well,

There is no restriction but the problem may occur on your clipboard. when you copy the data, it may be too large to be saved to text file. Try to fragment the data that you want to copy.

I hope that helps....
0
 

Author Comment

by:rehman123
ID: 12104568
Actually my problem was  i was writing to  textbox control  and  from there i was writing on text file , anupbhunia adviced me to write directly on text file and it worked , so i guess i must give all points to bhunia .
thanks .
bye.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Screencast - Getting to Know the Pipeline

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question