dbTalk Databases Forums  

ImportXML problem with optional fields

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


Discuss ImportXML problem with optional fields in the comp.databases.ms-access forum.



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

Default ImportXML problem with optional fields - 07-07-2011 , 09:37 AM






Using ImportXML to import xml data into Access tables. I typically,
delete all records in the target table (e.g. the table with the same
name as the xml structure) for the import and then importxml with the
"append data" option. The optional field(s) I am interested in are
included in the definition of the target table.

Having problem with optional fields. Some records have these optional
fields but most don't. My problem is that Importxml does not EVER
import the optional fields.

Suggestions?

Bob

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

Default Re: ImportXML problem with optional fields - 07-07-2011 , 02:49 PM






On 7/7/2011 9:37 AM, BobAlston wrote:
Quote:
Using ImportXML to import xml data into Access tables. I typically,
delete all records in the target table (e.g. the table with the same
name as the xml structure) for the import and then importxml with the
"append data" option. The optional field(s) I am interested in are
included in the definition of the target table.

Having problem with optional fields. Some records have these optional
fields but most don't. My problem is that Importxml does not EVER import
the optional fields.

Suggestions?

Bob
I ended up working around this by writing some vba code to traverse the
XML document and finding occurrences of the optional fields. For them I
used DAO logic to update the table previously created by ImportXML.

surely there must be an easier way.

Bob

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.