Re: Parsing a text file
- From: "Gary Walter" <gary@xxxxxxxxxxx>
- Date: Sat, 10 Nov 2007 07:34:39 -0600
Mike wrote:
I know there isn't room here for a complete answer, but I'm hoping someoneHi Mike,
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.
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 eachline (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
.
- Prev by Date: Re: "Not Equal" inside an IIf statement
- Next by Date: Re: Parameterized query in form
- Previous by thread: Re: Export Email Address from Access to Excel
- Next by thread: Re: Parsing a text file
- Index(es):
Relevant Pages
|