<?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>Re: Setting Namespace for Secondary Datasource in Visual Basic</title><link>https://www.infopathdev.com:443/forums/thread/58385.aspx</link><pubDate>Thu, 26 Aug 2010 17:04:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58385</guid><dc:creator>awwilkie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58385.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=58385</wfw:commentRss><description>&lt;p&gt;Found the solution...&lt;/p&gt;changed it from IXMLDOMDocument2 to IXMLDOMDocument3 as per below&amp;nbsp;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sds &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMDocument3 = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;CType&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(thisXDocument.GetDOM(&amp;quot;TBL_EMPLOYEE&amp;quot;), IXMLDOMDocument3)&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Setting Namespace for Secondary Datasource in Visual Basic</title><link>https://www.infopathdev.com:443/forums/thread/58383.aspx</link><pubDate>Thu, 26 Aug 2010 16:25:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58383</guid><dc:creator>awwilkie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58383.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=58383</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy...&lt;/p&gt;
&lt;p&gt;I entered the code into Visual Basic and it is underlining &lt;u&gt;sds.selectSingleNode. &lt;/u&gt;The message says the following &amp;quot;&amp;#39;selectSingleNode&amp;#39; is ambiguous across the inherited interfaces &amp;#39;Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument&amp;#39; and &amp;#39;Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode&amp;#39;.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Any ideas what is wrong here?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Setting Namespace for Secondary Datasource in Visual Basic</title><link>https://www.infopathdev.com:443/forums/thread/58357.aspx</link><pubDate>Thu, 26 Aug 2010 03:08:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58357</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58357.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=58357</wfw:commentRss><description>&lt;p&gt;This should do the trick:&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sds &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMDocument2 = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;CType&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(thisXDocument.GetDOM(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;TBL_EMPLOYEE&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;), IXMLDOMDocument2)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;sds.setProperty(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xmlns:dfs=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;quot; xmlns:d=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; emp_name &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMNode = sds.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;dfs:myFields/dfs:dataFields/d:TBL_EMPLOYEE/@EMPLOYEE_NAME&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/p&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;/font&gt;</description></item><item><title>Setting Namespace for Secondary Datasource in Visual Basic</title><link>https://www.infopathdev.com:443/forums/thread/58356.aspx</link><pubDate>Thu, 26 Aug 2010 02:03:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58356</guid><dc:creator>awwilkie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58356.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=58356</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to set the value of a secondary datasource field using this code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; emp_name = thisXDocument.GetDOM(&amp;quot;TBL_EMPLOYEE&amp;quot;).selectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:TBL_EMPLOYEE/@EMPLOYEE_NAME&amp;quot;)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I understand I need to define the namespace for the secondary datasource for this to work, but I can&amp;#39;t find any examples for Visual Basic. I am getting the typical error about dfs not being defined. Can someone assist with the proper code for VB in this situation?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I see this code already in my form but I think it is referring to the Main Connection.&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; The namespace prefixes defined in this attribute must remain synchronized with&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; those in the form definition file (.xsf).&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;lt;InfoPathNamespace(&amp;quot;xmlns:xsf=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/solutionDefinition&amp;quot;&amp;quot; xmlns:msxsl=&amp;quot;&amp;quot;urn:schemas-microsoft-com:xslt&amp;quot;&amp;quot; xmlns:xd=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;quot; xmlns:xsi=&amp;quot;&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;quot; xmlns:xdUtil=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/xslt/Util&amp;quot;&amp;quot; xmlns:xdXDocument=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument&amp;quot;&amp;quot; xmlns:xdMath=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/slt/Math&amp;quot;&amp;quot; xmlns:xdDate=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/xslt/Date&amp;quot;&amp;quot; xmlns:q=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/queryFields&amp;quot;&amp;quot; xmlns:d=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot;&amp;quot; xmlns:dfs=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;quot; xmlns:my=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXS/2009-05-20T22:00:01&amp;quot;&amp;quot;&amp;quot;)&amp;gt; _&lt;/p&gt;
&lt;p&gt;Many thanks for any help,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Andrew&lt;/font&gt;&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item></channel></rss>