Re: Parsing a text file

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



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




.



Relevant Pages

  • Re: How do I import a database from another computer?
    ... What format does the original have to be saved in so it can ... An Access Database is a complex object, ... container for multiple forms, reports, modules, queries, tables, and ... .mdb file as it can potentially contain damaging code). ...
    (microsoft.public.access.gettingstarted)
  • Changing report formats
    ... In order to store them into our MS Access database, ... to transform all reports into our format. ...
    (microsoft.public.excel.misc)
  • Formatting Text in Reports
    ... I'm creating an Access database in which I need to have control over the ... format of text printed in reports from memo fields. ...
    (microsoft.public.access.reports)
  • Re: Why doesnt the standard allow reuse of arguments in printf() ?
    ... you can't mix numbered specifications with unnumbered ones in the same ... format string N times to obtain the Nth argument, or to stack up all N ... Each descriptor contained the format specifier ...
    (comp.std.c)
  • Re: Convert MDB to ADP
    ... I will try to explain what I'm using in access mdb about filter queries ... I have a form where I generate reports, queries, forms and by automation I ... Is it possibel to find any function in SQL server to replace Format, ...
    (microsoft.public.access.adp.sqlserver)