dbTalk Databases Forums  

Question on importing data

comp.database.ms-access comp.database.ms-access


Discuss Question on importing data in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default Question on importing data - 12-24-2003 , 09:59 AM






Could someone please offer me some help on this:

I am new to Access and trying to figure out how to automate data
import from a science software. The science software outputs about a
hundred SEPARATE flat text data files for each run. The flat text
data files have the same fields and rows for each file.

I have created an Access table with the same fields that are present
in the data files. How can i automate the process of importing the
hundred or so data files with their respective fields into the Access
table's fileds. Since there are about a hundred of these flat text
data file tables, naturally i'd like the process to be automated.

Any guidance would be apprecited. Thanks

- Dan M.

Reply With Quote
  #2  
Old   
mharness
 
Posts: n/a

Default Re: Question on importing data - 12-24-2003 , 02:30 PM






Hey Dan,

Create an import spec and then use DoCmd.TransferText. The spec will allow
you to specify the data types and sizes and columns and you can then use it
in on all of the similar input files in the applicable TransferText
argument. This action will overwrite the previous table each time so if
you've got something worth saving be sure to move it to another table.

If you know the names of all of the imput files in advance and they are the
same every time I suppose you could fill a table with the file names, loop
through the list, and execute the TransferText each time through with each
input file name as one of the arguements OR there's probably a way to read
the file names directly from your sub-directory and skip the table.

Definitely have to do the latter if the names of your input files change but
I couldn't tell you how to read all of the names of files in a
sub-directory. Perhaps someone else knows how to do this or can suggest
another approach that will work better.

Mike

"Dan" <danmat347 (AT) hotmail (DOT) com> wrote

Quote:
Could someone please offer me some help on this:

I am new to Access and trying to figure out how to automate data
import from a science software. The science software outputs about a
hundred SEPARATE flat text data files for each run. The flat text
data files have the same fields and rows for each file.

I have created an Access table with the same fields that are present
in the data files. How can i automate the process of importing the
hundred or so data files with their respective fields into the Access
table's fileds. Since there are about a hundred of these flat text
data file tables, naturally i'd like the process to be automated.

Any guidance would be apprecited. Thanks

- Dan M.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.