Home > Archive > MS SQL XML > October 2005 > XML bulk load does not work on tables with primary keys?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author XML bulk load does not work on tables with primary keys?
guxu@hotmail.com

2005-10-27, 9:25 am

I realized that if I set the primary keys for the tables that I am
importing the XML data to, the XML bulk load does not work as it is
supposed to - in my case, only one table gets data and all others did
not get anything plus I get "The statement has been terminated" every
single time. Can anyone confirm if this is really true or not?
I removed the primary keys for the tables, and data was imported
correctly.

Here is what my XML looks like
<tag1> ...</tag1>
<tag2> ...</tag2>
<tag3 attr1=... >...</tag3>
<tag4 attr1=... >...</tag4>
<tag5 attr2=... >...</tag5>
<tag6 attr2=... >...</tag6>
....
<tagn>...</tagn>

tag3 and tag4 will go to a different table say table1, so are tag4 &
tag5, say table2. All the rest will go to the table say Main.

If I set the primary keys for 3 tables, I only get data imported to
Main. If I remove the key settings, all 3 tables get data.

Any clue why this is happening?

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com