dbTalk Databases Forums  

exportxml with multiple relationships

comp.databases.ms-access comp.databases.ms-access


Discuss exportxml with multiple relationships in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
eidosabi
 
Posts: n/a

Default exportxml with multiple relationships - 02-27-2008 , 02:30 AM






I've got an Access db that has many different relationships between
tables, for example, books <-> book_author <-> authors <->
author_institution <-> institutions. If I do an export xml from the
toolbar, there is an option to choose which data to export, for
example:

- $B""(B books
--- $B""(B book_author
----- [Lookup Data]
------- $B""(B authors
--------- $B""(B author_institution
----------- [Lookup Data]
------------- $B""(B institutions

Regardless of whether I export this way or via ExportXML in a VB
module, I get all the data, but I loose the node structure at certain
points. After trying everything I could think of, or find on the web,
I went back and examined the manual/toolbar option and noticed that
the relationships that fail to be maintained during the automated
process have a "[Lookup Data]" node between the parent and child node
(in the example above, between the book_author and author tables). So
I end up with something like:

<books>
<book_id>1</book_id>
<title>Run Rhonda Run</title>
<book_author>
<book_id>1</book_id>
<author_id>1</author_id>
</book_author>
<book_author>
<book_id>1</book_id>
<author_id>2</author_id>
</book_author>
</books>
<books>...more books...</books>
<authors>
<author_id>1</author_id>
<name>Rhonda Roads</name>
<author_instutute>
<author_id>1</author_id>
<institution_id>1</institution_id>
</author_institution>
</authors>
<authors>
<author_id>2</author_id>
<name>Robby Roads</name>
<author_instutute>
<author_id>1</author_id>
<institution_id>1</institution_id>
</author_institution>
</authors>
<authors>...more authors...</authors>
<instututions>
<institution_id>1</institution>
<name>Lincoln Elementary</name>
</institutions>
<institutions>...more institutions...</institutions>

I tried mucking around with relationships, but I'm always give the
same export options, regardless of table relationship definitions.

Does anybody have any suggestions on how to maintain the parent-child
node relationships all the way down a tree during an xml export?

Thanks in advance!

-d

Reply With Quote
  #2  
Old   
eidosabi
 
Posts: n/a

Default Re: exportxml with multiple relationships - 02-27-2008 , 02:36 AM






p.s. it's Access 2003 and the client can't upgrade at this time

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.