On 8/8/00, Ben Densmore penned:
>Can anyone tell me the best way or give me some ideas on how to take =
>data that is in multiple csv files and suck all of it into multiple =
>tables in an access database? I'm currently working on a project where I =
>need to do this and the people who wrote the DB and the csv files aren't =
>helping much at all, if no one has any ideas does anyone know of a list =
>similar to this one that is database specific.
It can be done easily using cffile if the database and tables already
exist and either (a), you aren't going to be using all the fields in
the csv file, or (b) they are in a different order in the database.
If you will be using all the fields in the csv files, then you can
import it straight into an access database using the Get External
Data command in the file menu. Choose csv as the file type, browse to
the folder it's in and select the file. Choose delimited as the
format. It should recognize the delimiter as a comma. If not, you can
specify it. You can choose whether to use a text qualifier. In other
words, if the content of each field of the csv file has quotes around
it, choose ". If not, choose None.
Access will ask you if you want to import to an existing table or
create a new one. If the table is existing, the columns in the table
will need to be in the same order as the csv fields. If you choose to
import to a new table, access will create it. You can choose Advanced
and specify the data type for each field, but you will need to go
into Access afterward and set the lengths, whether they are required,
etc.
HTH
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.