automate csv import from MS Access including header line

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

automate csv import from MS Access including header line

Post by tford »

I've worked out a way to create fully automate the process of exporting query results from MS Access to a CSV file which AwareIM can then import.

The tricky part was creating the first line of the CSV including BO.attribute info for each column of the CSV file.

If anyone is interested, let me know & I'll post details.

Tom
avatar69
Posts: 40
Joined: Thu Mar 01, 2007 5:30 pm
Location: Swindon, UK

Post by avatar69 »

Plese post the details. What should the CSV file look like?

Assume the following:

BO.CountryName
BO.CountryCode
BO.Region
BO.Economy

Then what should the CSV file look like?

My current CSV file has CountryName, CountryCode, Region and Economy as the top cells (done in Excel) and then the data below. Where did I go wrong?
JTU
Spirax Sarco
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

You need a header in the form

Code: Select all

BO.Attribute1, BO.Attribute2, BO.Attribute3
So of you add the BO's name to the fields in the header everything should work
avatar69
Posts: 40
Joined: Thu Mar 01, 2007 5:30 pm
Location: Swindon, UK

Post by avatar69 »

Thank you!!! You are a GENIOUS! I've been going around the loop on this like crazy, and couldnt figure out what went wrong.... Many thanks again.
JTU
Spirax Sarco
pixerp
Posts: 180
Joined: Sun Jan 28, 2007 7:12 pm

Post by pixerp »

The way I found to be easy is :

. create the BO with the attributes
. enter some information
. export the csv file
. open the csv file in OpenOffice Calc - straightforward (not in Excel)
. copy and paste your data
. import your csv file.

Just my little experience.
Post Reply