PDA

Click to See Complete Forum and Search --> : Data export and import


andreww
May 15th, 2000, 10:09 PM
I have data in two access97 mdb databases. I need to export some data (query based) to csv file, process in another application, then import into a different mdb. I have used DDE with limited success as this needs both databases open to run, can anyone suggest an easy way of doing this? is DAO the way to go?

May 17th, 2000, 04:16 AM
Hello andreww,

What I would do to export the file to a csv file is to make a recordset in DOA of what I wanted to export then open a file and use the write or if your really feeling froggy of if you have nested quote's use the print statement and set up your own comma's for the csv file.

Hope this helps,

andreww
May 17th, 2000, 02:53 PM
That's exactly what I did for the output but I am stuck with the import from CSV into the dataset, any ideas?

your reply was appreciated

May 17th, 2000, 07:15 PM
Hello,

Ok then to read it data back into a recordset use the input# statement and loop thru the cvs file and read each "record" back into the recordset.

If you need a sample let me know.

Best,

andreww
May 17th, 2000, 07:34 PM
That would be fine if the fields were not enclosed in quotes, do i have to go through and strip all quotes out or is there another way?

=8-(

May 17th, 2000, 08:06 PM
The input statement will remove the quotes from around the strings when it returns the data. You shouldn't have any problems with that at all.