Re: Parsing a text file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Mike wrote:
I know there isn't room here for a complete answer, but I'm hoping someone
can direct me to a website, or even resources like books or training CD's
that can help me with a problem. We have an old mainframe that still works
in
the realm of printing Green Bar reports. An upgrade a few years ago has
the
mainframe outputting the data to "virtual" greenbar reports that can be
read
on a personal computer. The problem is, that data isn't mush good for
broad
analysis. So I need to read the data into a database, one report at a
time,
so we can analyze the data once it is in one spot. To do this, I need to
be
able to read a text file, parsing it one line at a time and storing each
value found to be pertinent into an Access database.

I actually know how to do this in something like QuickBasic, but not in
the
Visual basic that is used with Access. Where could I learn how to do this?
I
have three books on Access, but none of them goes into enough detail to
tell
me how to accomplish this. I understand there is a commercial program out
there called Monarch that does this, but they want $600 a copy and that's
too
rich for my blood.

Hi Mike,

How big are these files and do they end each line with CRLF?

In addition to Dale's sage help, here be something that might help
you get *started*.

http://www.freevbcode.com/ShowCode.Asp?ID=3280

It will pull all, or parts of, a file into a temp table.

From there you can better identify how to further parse each
line (saved as record in temp table) into your final table.

The point being that I always found it easier to work
with a small file initially, plus it is good to know *what*
you are working with (strange characters, no CR, etc.)

Maybe it might help...

good luck,

gary



.



Relevant Pages

  • Re: TAPED PRIVATE CONVERSATION BETWEEN AIPAC & COUNSELOR FOR ISRAELI
    ... he reports that Mossad knew of the plans to attack the Marine Barracks ... Having worked as a foreign correspondent, ... I wrote the whole thing in 30 exercise books. ... In the run-up to the Gulf War, I had a rare interview with Saddam ...
    (misc.news.internet.discuss)
  • Re: So...
    ... a magazine (especially a literary mag rather than a news mag - ... OTOH, reporters at the bigs frequently write books about their work, ... which I'll bet Mike isn't. ...
    (rec.arts.comics.strips)
  • Re: steamed charcoal
    ... I know..If Mike is Mike S, then I know his postings.. ... Mr. Emous has been posting to this 'newsgroup' for so many years I can't count them and both Gentlemen have contributed mightily to the Art by writing articles and compiling books that can be found without a lot of trouble in the Pyrotechnic literature. ... France in the affairs of Belgium would have resulted in serious ...
    (rec.pyrotechnics)
  • Re: THEY DID IT!!!!!! WOO HOO and OT
    ... He reports to Orlando in August. ... He plans on taking the train to Orlando on the 9th and reporting on the 11th. ... the kids worked out their problem with the security guard at the cafeteria at FTCC. ... I told Mike to get a picture with my camera as I decided not to get the phone plan that allows phone pictures to be put on other media. ...
    (rec.pets.cats.anecdotes)
  • Re: Upgrade to Office Pro 2007 from Office Pro 2000
    ... The Missing Manual books give me credit for being able to read sentences with more than 4 or 5 single syllable words. ... Microsoft MVP - Publisher ... > I have bee using Office Pro 2000 for a long time now and have decided> to ... > Mike S ...
    (microsoft.public.office.misc)