Results 1 to 5 of 5
  1. #1
    villacam is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2014
    Posts
    3

    ExportXML 2010 vs 2013

    The following code works great in Access 2010 but not in 2013



    Dim objJobInfo As AdditionalData

    Set objJobInfo = Application.CreateAdditionalData

    With objJobInfo
    .Add "Group"
    .Add "Schedule"
    End With

    Application.ExportXML ObjectType:=acExportTable, DataSource:="Spec", _
    DataTarget:="D:\Temp ADE XI Config.xml", AdditionalData:=objJobInfo

    In access 2010 I get the XML file with Spec, Group, and Schedule nodes with all records inside. However, when I run the same code (copied database to 2013) when I run my code I get The Spec Node with one record and the group and schedule nodes INSIDE the Spec node. All nodes only show one record.

    Any ideas???????

    Thanks

    Results for Same Tables


    Good Export -- Access 2010

    <?xml version="1.0" encoding="UTF-8"?>
    -<dataroot generated="2014-09-15T15:38:07" xmlnsd="urn:schemas-microsoft-comfficedata">-<Spec><Name>HolmanVendor2Export</Name><SQLCommandText>Co15InventoryQuery</SQLCommandText><Type>DELIMITED</Type><Delimiter>CSV</Delimiter><IncludesColumnHeadings>0</IncludesColumnHeadings><UseTimeStamp>N</UseTimeStamp><AutoGenerateFields>1</AutoGenerateFields><XIGroupName>VEMMainConfig2</XIGroupName><XIScheduleName>GET_EveryHr</XIScheduleName><LastExecutedOn>2014-07-30T08:44:22</LastExecutedOn></Spec>-<Group><Name>Holman_Vendor1</Name><ConnectionString>Provider=Microsoft.ACE.OLED B.12.0;Data Source=D:\Holman\Holman.accdb</ConnectionString><Method>FILESAVE</Method></Group>-<Group><Name>VEMMainConfig2</Name><ConnectionString>Provider=Microsoft.ACE.OLED B.12.0;Data Source=D:\Holman\Holman.accdb</ConnectionString><ExportFolder>c:\temp\export\</ExportFolder><Method>FTP</Method><FTPServer>ftp.ats-corp.com</FTPServer><FTPDirectory>incoming</FTPDirectory><FTPUserName>ats\nick</FTPUserName><FTPPassword>mike</FTPPassword></Group>-<Schedule><Name>GET_Daily</Name><Frequency>Weekly</Frequency><Hour>1899-12-30T14:00:00</Hour></Schedule>-<Schedule><Name>GET_Weekly</Name><Frequency>Weekly</Frequency><Hour>1899-12-30T13:00:00</Hour><DayOfWeek>Wednesday</DayOfWeek></Schedule>-<Schedule><Name>GET_SemiMonthly</Name><Frequency>Monthly</Frequency><Hour>1899-12-30T13:00:00</Hour><DayOfMonth>15</DayOfMonth></Schedule>-<Schedule><Name>GET_Monthly</Name><Frequency>Monthly</Frequency><Hour>1899-12-30T16:00:00</Hour><DayOfMonth>1</DayOfMonth></Schedule>-<Schedule><Name>GET_EveryHr</Name><Frequency>Every</Frequency><Hour>1899-12-30T01:00:00</Hour></Schedule></dataroot>


    BAD Export -- Access 2013

    <?xml version="1.0" encoding="UTF-8"?>
    -<dataroot generated="2014-09-15T14:18:15" xmlnsd="urn:schemas-microsoft-comfficedata"> -
    <Spec> <Name>HolmanVendor2Export</Name> <SQLCommandText>Co15InventoryQuery</SQLCommandText> <Type>DELIMITED</Type> <Delimiter>CSV</Delimiter> <IncludesColumnHeadings>0</IncludesColumnHeadings> <UseTimeStamp>N</UseTimeStamp> <AutoGenerateFields>1</AutoGenerateFields> <XIGroupName>VEMMainConfig2</XIGroupName> <XIScheduleName>GET_EveryHr</XIScheduleName> <LastExecutedOn>2014-07-30T08:44:22</LastExecutedOn> -<
    <Group><Name>VEMMainConfig2</Name><ConnectionString>Provider=Microsoft.ACE.OLED B.12.0;Data Source=D:\Holman\Holman.accdb</ConnectionString><ExportFolder>c:\temp\export\</ExportFolder><Method>FTP</Method><FTPServer>ftp.ats-corp.com</FTPServer><FTPDirectory>incoming</FTPDirectory><FTPUserName>ats\nick</FTPUserName><FTPPassword>mike</FTPPassword></Group>
    <Schedule> <Name>GET_EveryHr</Name> <Frequency>Every</Frequency> <Hour>1899-12-30T01:00:00</Hour> </Schedule>
    </Spec>
    </dataroot>

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    Instead of using code, did you try just using a query, then exporting the query?

  3. #3
    villacam is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2014
    Posts
    3

    Export

    Quote Originally Posted by ranman256 View Post
    Instead of using code, did you try just using a query, then exporting the query?
    Thanks for quick reply.

    Don't understand. I need all three tables in the same xml file. A union of these tables is not possible. Is that what you had in mind??

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    Either way
    1 query having 3 tables to 1 export file
    or
    3 queries (union) making 1 export file

  5. #5
    villacam is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2014
    Posts
    3
    Solved. Problem is that Access 2010 does not take relationships into consideration and 2013 does. Removed relationships and XML export worked the same.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 08-13-2014, 10:32 PM
  2. Code for 2010 not working in 2013
    By leskoms in forum Programming
    Replies: 4
    Last Post: 02-19-2014, 08:08 PM
  3. 2007, 2010 or 2013.
    By Paul H in forum Access
    Replies: 4
    Last Post: 02-14-2014, 09:32 AM
  4. User entered filename for ExportXML?
    By nhabegger in forum Import/Export Data
    Replies: 1
    Last Post: 10-08-2010, 08:54 PM
  5. ExportXML 800A0400 VBscipt Error
    By gmaczek in forum Import/Export Data
    Replies: 0
    Last Post: 05-10-2010, 08:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums