Re: Parsing a text file
- From: "Dale Fye" <dale.fye@xxxxxxxxxx>
- Date: Sat, 10 Nov 2007 14:28:15 -0500
After re-reading my post, I realized that I didn't talk any more about
"import specifications". Are you familiar with these, or would you like
some help in that area?
Dale
"Dale Fye" <dale.fye@xxxxxxxxxx> wrote in message
news:99B2E968-8F40-4190-9A99-65759963363A@xxxxxxxxxxxxxxxx
Mike,
If these files are all in the same format, you can create a destination
table that contains fields for all of the data, and maybe a couple
additional
fields to identify the file you got the data from. This probably needs to
be
a temporary table, as there will probably be some transformations that you
need to do to get the data from the report format into the actual format
you
want.
Then, create an import specification (more on this in a second) that maps
the fields from your reports to the fields in your table. Once you have
this
done, you can write some code that loops through your files, and uses the
DoCmd.TransferText method to import the data from the text file to the
temporary datafile. Then, transform it to get it into the final format
you
want it in.
HTH
Dale
--
Don''t forget to rate the post if it was helpful!
Email address is not valid.
Please reply to newsgroup only.
"Praising Jesus" 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.
Any help would be appreciated.
---Mike
.
- Prev by Date: Re: Form dependent queries with multiple criteria options
- Next by Date: how do i query Multiple Databases in access?
- Previous by thread: Re: Parsing a text file
- Next by thread: Re: Parsing a text file
- Index(es):
Relevant Pages
|