<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Programmatically Copy Data from Secondary Data Connection into Main Data Connection</title><link>https://www.infopathdev.com:443/forums/thread/95107.aspx</link><pubDate>Thu, 09 Jan 2014 15:26:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95107</guid><dc:creator>hayer89</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95107.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95107</wfw:commentRss><description>I am having trouble copying data from my secondary data connection into my main data connections repeating table, below is my code for adding an item to my main data connections repeating table:
&lt;p&gt;
&lt;p&gt;Private Sub AddItem( _
&lt;p&gt;ByVal Car As String)
&lt;p&gt;Dim doc As XmlDocument = New XmlDocument()
&lt;p&gt;Dim group As XmlNode = doc.CreateElement(&amp;quot;CurrentBodiesSnapShot&amp;quot;, _
&lt;p&gt;NamespaceManager.LookupNamespace(&amp;quot;d&amp;quot;))
&lt;p&gt;
&lt;p&gt; Dim field As XmlNode = doc.CreateElement(&amp;quot;Car_ID&amp;quot;, _
&lt;p&gt;NamespaceManager.LookupNamespace(&amp;quot;@&amp;quot;))
&lt;p&gt;Dim node As XmlNode = group.AppendChild(field)
&lt;p&gt;node.InnerText = Car
&lt;p&gt;
&lt;p&gt;doc.AppendChild(group)
&lt;p&gt;
&lt;p&gt;MainDataSource.CreateNavigator().SelectSingleNode( _
&lt;p&gt;&amp;quot;/dfs:myFields/dfs:dataFields&amp;quot;, _
&lt;p&gt;NamespaceManager).AppendChild(doc.DocumentElement.CreateNavigator())
&lt;p&gt;
&lt;p&gt;End Sub
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;I get this message when I enter debugging mode &amp;quot;Schema validation found non-data type errors&amp;quot;, it highlights this line when it pops up:
&lt;p&gt;
&lt;p&gt;MainDataSource.CreateNavigator().SelectSingleNode( _
&lt;p&gt;&amp;quot;/dfs:myFields/dfs:dataFields&amp;quot;, _
&lt;p&gt;NamespaceManager).AppendChild(doc.DocumentElement.CreateNavigator())
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;Its the first time I&amp;#39;ve had this message and do not know how to get around it, and I think its with the &amp;quot;/dfs:myFields/dfs:dataFields&amp;quot; code, if anyone could provide any assistance I would greatly appreciate it :)
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;Thanks in advance!</description></item></channel></rss>