Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export Table to CSV - Access to CSV - using python 18 166
Not needed 13 119
c++ reading data from file into two dimensional array 3 117
iframe detection of parent window scale 20 85
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
A short article about problems I had with the new location API and permissions in Marshmallow
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 …

808 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