Re: Saving text data to file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: MikeD (nobody_at_nowhere.edu)
Date: 05/08/04


Date: Sat, 8 May 2004 18:10:19 -0400


"Jack" <replyto@newsgroup> wrote in message
news:%23Wz48KUNEHA.3988@TK2MSFTNGP09.phx.gbl...
> What is the best method of saving text data to file, which contains CR LF
> characters embedded?
> When saving directly, there is a problem when reading back that data using
> Line Input: the line is not being read completely.
> I know, I can replace CR & LF characters with different character when
> saving.
> However it is CPU time consuming procedure and it extends drammatically
data
> saving time.
> Because of data structure ( it is the content of ListView) I prefer saving
> that text data line by line.
> What is the most efficient method to use?

I'm with Duane. Just from what you've stated, it seems your implementation
is most likely the problem. Unless you tell us exactly what you're doing
and how you're doing it (preferably by posting relevant code and a *small*
portion of the text file to give us an idea of its structure), we can't help
you much.

It sounds like your text file contains records (essentially, a database).
In that case, you should consider that a text file is hardly the most
efficient means of data storage, particularly for file I/O. It's entirely
possible (in fact, probable) that even a simple random-access file would
greatly increase performance and eliminate whatever problem you're having in
not being able to read the entire "line".

Mike



Relevant Pages

  • {kjd-exp} Recalibrating Saving Throws
    ... Recalibrating Saving Throws ... characters with different saving throw progressions. ... that this should be expected) casting a ninth-level spell will ... creature's ability score modifier. ...
    (rec.games.frp.dnd)
  • Re: Excel text export limit - 1024 per line (not cell), workaround
    ... I am saving it as CSV - specifically what I am doing is taking a large ... today I had one field that had 690 characters in it. ... exporting the data and the version of excel you're using. ...
    (microsoft.public.excel.misc)
  • Getting back input from unix(command)
    ... that make MATLAB think that its done reading the file when infact it ... I cant suppress the characters so I'm ... right now I'm still saving it to file with fwrite() and then I'm ...
    (comp.soft-sys.matlab)
  • Re: Saving text data to file
    ... > What is the best method of saving text data to file, ... > characters embedded? ... > However it is CPU time consuming procedure and it extends drammatically data ... > What is the most efficient method to use? ...
    (microsoft.public.vb.general.discussion)
  • Re: Saving text data to file
    ... > What is the best method of saving text data to file, ... > characters embedded? ... > Because of data structure (it is the content of ListView) I prefer saving ... Dim sValues As String ...
    (microsoft.public.vb.general.discussion)