IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

data being lost when exporting to database Options · View
oli oli
Posted: Friday, April 18, 2008 10:45:55 AM
Rank: Newbie

Joined: 4/18/2008
Posts: 3
Hello,

I am very new to xml and xmlspy in particular. I have nearly 500 xml files containing customer order information to import into access tables and am having great difficulty.

I can export one file to an access database if I create primary and foreign keys as part of the export and have rebuilt the relationships in access.

1)Nearly all records are correct, except for a few at the top of my order file which arent linking the correct customer to the order and are instead leaving these lines blank with just a product on the end.

2)I have a massive problem that when i import a 2nd file into the same tables, it generates the primary and foreign keys for each table starting at 1 again. Therefor as soon as I import a 2nd file I have duplicate keys in every table and the data is meaningless.

3) I dont understand how to use mapforce to do this (as has been recommended to me) even though I have followed the tutorial, I am posting a thread in the mapforce forum about my problems here.

If it would help to post examples of any files such as the schema or a screenshot my relationships i have input in the target access table please let me know (and tell me how to do this).

Thanks in advance for any help
Gandalf
Posted: Monday, April 21, 2008 6:27:05 AM
Rank: Member

Joined: 9/18/2003
Posts: 29
Location: AT
Hi oli oli,

Which database are you using? How are you connecting to your database, via ADO or ODBC?

Regards,
Gandalf
oli oli
Posted: Monday, April 21, 2008 10:35:29 AM
Rank: Newbie

Joined: 4/18/2008
Posts: 3
Hi,

Sorry I forgot to mention, I am using Access 2003 and ADO at the moment.

Since posting this problem I tried batch importing by using dos to combine files and notepad to find and replace the header records and the appropriate unrequired table tags which was working but makes files that are too big to work with.

I am instead updating all the primary and foreign keys in all the tables with a letter as a prefix so that file A will have all records numbered A1-1000, file be will have B1-1000 etc.

This is long winded but seems to work.

On the product missing details front, I am thinking this may be due to the original data as when I open up a xml file in excel, all orders placed with this product dont seem to have full details against them to start off with. however, they do have a customer linked to them which I am still missing...
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.