Solved

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

Posted on 2004-09-20
5
255 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 500 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
triangle challenge 4 79
mapAB Challlenge 35 89
C# code editing and collaboration 3 47
Recommendation vb6 to vb.net or others 14 39
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now