<?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: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6418.aspx</link><pubDate>Mon, 19 Mar 2007 18:39:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6418</guid><dc:creator>grhind</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6418.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6418</wfw:commentRss><description>Try this... it's vb.net managed code but you get the idea.&lt;br /&gt;&lt;br /&gt;Public Function GetTemplateXMLFileDOM() As IXMLDOMDocument3&lt;br /&gt;        Dim TemplateDOM As IXMLDOMDocument3&lt;br /&gt;&lt;br /&gt;        TemplateDOM = prXDoc.CreateDOM()&lt;br /&gt;        TemplateDOM.async = False&lt;br /&gt;        TemplateDOM.validateOnParse = False&lt;br /&gt;        TemplateDOM.load("template.xml")&lt;br /&gt;&lt;br /&gt;        Dim MyAttribute As InfoPathNamespaceAttribute&lt;br /&gt;        MyAttribute = CType(Attribute.GetCustomAttribute(prParentClassType, GetType(InfoPathNamespaceAttribute)), InfoPathNamespaceAttribute)&lt;br /&gt;        prInfoPathNamespace = MyAttribute.UserNamespace&lt;br /&gt;&lt;br /&gt;        TemplateDOM.setProperty("SelectionNamespaces", prInfoPathNamespace)&lt;br /&gt;&lt;br /&gt;        Return TemplateDOM&lt;br /&gt;    End Function</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6417.aspx</link><pubDate>Fri, 03 Dec 2004 22:49:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6417</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6417.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6417</wfw:commentRss><description>I'm not sure I follow what you are trying to do. What I understood your original request to be was to find out how to access EmployeeID via selectSingleNode -- which it sounds like you are now able to do.&lt;br /&gt;&lt;br /&gt;What I don't understand is why you are trying to convert it to an IXMLDOMDocument2.&lt;br /&gt;&lt;br /&gt;Therefore... please rephrase what it is you are trying to accomplish here so that I can offer appropraite help.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6416.aspx</link><pubDate>Thu, 02 Dec 2004 20:59:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6416</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6416.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6416</wfw:commentRss><description>According to what you're saying, if I use what I currently have and add another line...&lt;br /&gt;&lt;br /&gt;            Dim domFoo As IXMLDOMDocument2 = CType(thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest"), IXMLDOMDocument2)&lt;br /&gt;&lt;br /&gt;            domFoo.setProperty("SelectionNamespaces", "xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-22T19:23:16"" xmlns:_xdns0=""http://schemas.microsoft.com/office/infopath/2003/changeTracking"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:ns1=""http://www.tempuri.org/DataSet1.xsd"" xmlns:diffgr=""urn:schemas-microsoft-com:xml-diffgram-v1"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata"" xmlns:ws1=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" xmlns:ns3=""http://www.tempuri.org/DataSet2.xsd""")&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;&lt;b&gt;            Dim MyTest As IXMLDOMDocument2 = CType(domFoo.selectSingleNode("//ns3:EmployeeID"), IXMLDOMDocument2)&lt;/b&gt;&lt;/font id="green"&gt;&lt;br /&gt;&lt;br /&gt;I have a syntax error which follows...&lt;br /&gt;&lt;br /&gt;'selectSingleNode' is ambiguous across the inherited interfaces&lt;br /&gt;'Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument' and&lt;br /&gt;'Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode'&lt;br /&gt;&lt;br /&gt;when I change the last line to :&lt;br /&gt;domFoo.selectSingleNode("//ns3:EmployeeID")&lt;br /&gt;&lt;br /&gt;it runs through properly (I don't get an error, syntax-wise), of course, it's of no use...&lt;br /&gt;&lt;br /&gt;I understand what the error is saying, the SelectSingleNode is inherited from a couple of places, but how do I remedy this?</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6415.aspx</link><pubDate>Thu, 02 Dec 2004 19:51:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6415</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6415.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6415</wfw:commentRss><description>If I take your XML code from the previous post and use it to create "test.xml", then create a new blank form (JScript), and import that as a secondary data source, I am able to access the value of EmployeeID with no problem...&lt;br /&gt;&lt;br /&gt;var  domFoo = XDocument.GetDOM("test");&lt;br /&gt;&lt;br /&gt;domFoo.setProperty("SelectionNamespaces", 'xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:ns4="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1" xmlns:_xdns0="http://schemas.microsoft.com/office/infopath/2003/changeTracking" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.tempuri.org/DataSet1.xsd" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:ws1="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1" xmlns:ns3="http://www.tempuri.org/DataSet2.xsd"');&lt;br /&gt;&lt;br /&gt;var x = domFoo.selectSingleNode("//ns3:EmployeeID");&lt;br /&gt;XDocument.UI.Alert(x.text);	&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have not tried this in VB.NET as you are using... but it should work just fine.&lt;br /&gt;&lt;br /&gt;And yes... the watch window will not show the namespace that you defined for selection purposes. It will show the one that is defined in the XML -- which is the default namespace.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6414.aspx</link><pubDate>Thu, 02 Dec 2004 15:05:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6414</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6414.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6414</wfw:commentRss><description>I see your point, but my results from my watch window appear to be pretty much the same.  I've changed my Web Service to reflect dataset2 instead of dataset1 for differential purposes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim domFoo As IXMLDOMDocument2 = CType(thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest"), IXMLDOMDocument2)&lt;br /&gt;&lt;br /&gt;            domFoo.setProperty("SelectionNamespaces", &lt;br /&gt;"xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-22T19:23:16"" xmlns:_xdns0=""http://schemas.microsoft.com/office/infopath/2003/changeTracking"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:ns1=""http://www.tempuri.org/DataSet1.xsd"" xmlns:diffgr=""urn:schemas-microsoft-com:xml-diffgram-v1"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata"" xmlns:ws1=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" &lt;br /&gt;&lt;b&gt;xmlns:ns3=""http://www.tempuri.org/DataSet2.xsd&lt;/b&gt;""")&lt;br /&gt;&lt;br /&gt;As you can see by my last line that I should be able to use ns3.  The problem is that when I view it in the watch window it doesn't reflect the proper namespace:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:ns4="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-22T19:23:16" xmlns:_xdns0="http://schemas.microsoft.com/office/infopath/2003/changeTracking" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" &lt;font color="green"&gt;&lt;b&gt;xmlns:ns3="http://www.tempuri.org/DataSet2.xsd" &lt;/b&gt;&lt;/font id="green"&gt;xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dfs:queryFields&amp;gt;&amp;lt;ns4:SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;/ns4:SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;/dfs:queryFields&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dfs:dataFields&amp;gt;&lt;br /&gt;&amp;lt;SelectEmployeesWithHardwareSoftwareRequestResponse xmlns="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"&amp;gt;&lt;br /&gt;&amp;lt;SelectEmployeesWithHardwareSoftwareRequestResult&lt;b&gt;&amp;gt;&amp;lt;DataSet2 xmlns="http://www.tempuri.org/DataSet2.xsd"&amp;gt;&lt;/b&gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest1" msdata:rowOrder="0"&amp;gt;&lt;br /&gt;&amp;lt;EmployeeID&amp;gt;1100&amp;lt;/EmployeeID&amp;gt;&lt;br /&gt;&amp;lt;NameAndRequest&amp;gt;Simon, Marcia&amp;lt;/NameAndRequest&amp;gt; &amp;lt;HardwareSoftwareRequestID&amp;gt;99991100&amp;lt;/HardwareSoftwareRequestID&amp;gt;&lt;br /&gt;&amp;lt;RequestStatus/&amp;gt;&lt;br /&gt;&amp;lt;MyOrder&amp;gt;2&amp;lt;/MyOrder&amp;gt;&lt;br /&gt;&amp;lt;MyOrder2&amp;gt;3&amp;lt;/MyOrder2&amp;gt;&lt;br /&gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&lt;br /&gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest2" msdata:rowOrder="1"&amp;gt;&lt;br /&gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&lt;br /&gt;&amp;lt;NameAndRequest&amp;gt;Wheeler, Darryl - test1&amp;lt;/NameAndRequest&amp;gt;&lt;br /&gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;1&amp;lt;/HardwareSoftwareRequestID&amp;gt;&lt;br /&gt;&amp;lt;RequestStatus&amp;gt;Closed&amp;lt;/RequestStatus&amp;gt;&lt;br /&gt;&amp;lt;MyOrder&amp;gt;4&amp;lt;/MyOrder&amp;gt;&lt;br /&gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&lt;br /&gt;&amp;lt;Table1 diffgr:id="Table11" msdata:rowOrder="0"&amp;gt;&lt;br /&gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&lt;br /&gt;&amp;lt;FileAs&amp;gt;Wheeler, Darryl&amp;lt;/FileAs&amp;gt;&lt;br /&gt;&amp;lt;NTAccount&amp;gt;Dwheeler&amp;lt;/NTAccount&amp;gt;&lt;br /&gt;&amp;lt;/Table1&amp;gt;&lt;br /&gt;&amp;lt;/DataSet2&amp;gt;&lt;br /&gt;&amp;lt;/SelectEmployeesWithHardwareSoftwareRequestResult&amp;gt;&lt;br /&gt;&amp;lt;/SelectEmployeesWithHardwareSoftwareRequestResponse&amp;gt;&lt;br /&gt;&amp;lt;/dfs:dataFields&amp;gt;&lt;br /&gt;&amp;lt;/dfs:myFields&amp;gt;&lt;br /&gt;&lt;br /&gt;I'm not sure of how to change to Namespace, because it doesn't appear to be working for the DataFields section.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6413.aspx</link><pubDate>Wed, 01 Dec 2004 21:03:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6413</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6413.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6413</wfw:commentRss><description>IMPORTANT 1:&lt;br /&gt;It is good practice to set EVERY namespace used in your data source, whether you use them or not. This saves headaches later when you decide you need to access other fields, but never set the namespace required to access for them.&lt;br /&gt;&lt;br /&gt;IMPORTANT 2:&lt;br /&gt;Also, any "default namespace" -- one without a prefix, should ALWAYS have a prefix added to it. You will NOT be able to select fields associated with that default namespace unless you provide a prefix and then use that prefix.&lt;br /&gt;&lt;br /&gt;You have two of these in your sample XML:&lt;br /&gt;    xmlns="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"&lt;br /&gt;    xmlns="http://www.tempuri.org/DataSet1.xsd"&lt;br /&gt;&lt;br /&gt;I would assign the random prefixes (make sure they aren't already assigned):&lt;br /&gt;    xmlns:ws1="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"&lt;br /&gt;    xmlns:ns1="http://www.tempuri.org/DataSet1.xsd"&lt;br /&gt;&lt;br /&gt;(I use "ns1" here because it looks like that's what InfoPath used according to a previous post of yours).&lt;br /&gt;&lt;br /&gt;This means that any "default namespace" child of the element "SelectEmployeesWithHardwareSoftwareRequestResponse" will need to be accessed using the "ws" namespace. And that any "default namespace" child of the element "DataSet1" will need to be accessed using the "ns1" namespace.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That would bring your code to look like this:&lt;br /&gt;&lt;br /&gt;Dim domFoo As IXMLDOMDocument2 = CType(thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest"), IXMLDOMDocument2)&lt;br /&gt;domFoo.setProperty("SelectionNamespaces", "xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-22T19:23:16"" xmlns:_xdns0=""http://schemas.microsoft.com/office/infopath/2003/changeTracking"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:ns1=""http://www.tempuri.org/DataSet1.xsd"" xmlns:diffgr=""urn:schemas-microsoft-com:xml-diffgram-v1"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata"" xmlns:ws1=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"" xmlns:ns1=""http://www.tempuri.org/DataSet1.xsd""")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now that you've defined "ns1" as the prefix for the default namespace on the dataset, you can use "ns1" as defined in your matchpath:&lt;br /&gt;&lt;br /&gt;MatchPath:="/dfs:myFields/dfs:dataFields/ns4:SelectEmployeesWithHardwareSoftwareRequestResponse/ns4:SelectEmployeesWithHardwareSoftwareRequestResult/ns1:DataSet1/ns1:Table1/ns1:EmployeeID"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I think your biggest issue was not assigning a prefix to the default namespaces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6412.aspx</link><pubDate>Wed, 01 Dec 2004 14:23:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6412</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6412.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6412</wfw:commentRss><description>I believe that .Net has already declared these items that you mentioned.&lt;br /&gt;&lt;br /&gt;The point I'm at currently is:  I have the following 2 statements&lt;br /&gt;            Dim domFoo As IXMLDOMDocument2 = CType(thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest"), IXMLDOMDocument2)&lt;br /&gt;            domFoo.setProperty("SelectionNamespaces", "xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1""")&lt;br /&gt;&lt;br /&gt;When I put "domFoo" in the &lt;b&gt;watch window, &lt;/b&gt;and look at the xml attribute, I can see the results of my previously entered stored  procedure query in one of the above blogs which consisted of a SELECT-UNION-SELECT-SELECT.&lt;br /&gt;&lt;br /&gt;The question now is how do I retrieve a value from the resulting XML string (displaying within the watch window)?&lt;br /&gt;&lt;br /&gt;Here is the resulting XML string (within the watch window):&lt;br /&gt;&lt;br /&gt;&amp;lt;dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:ns4="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-11-22T19:23:16" xmlns:_xdns0="http://schemas.microsoft.com/office/infopath/2003/changeTracking" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.tempuri.org/DataSet1.xsd" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&amp;gt;&amp;lt;dfs:queryFields&amp;gt;&amp;lt;ns4:SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;/ns4:SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;/dfs:queryFields&amp;gt;&amp;lt;dfs:dataFields&amp;gt;&amp;lt;SelectEmployeesWithHardwareSoftwareRequestResponse xmlns="http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1"&amp;gt;&amp;lt;SelectEmployeesWithHardwareSoftwareRequestResult&amp;gt;&amp;lt;DataSet1 xmlns="http://www.tempuri.org/DataSet1.xsd"&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest1" msdata:rowOrder="0"&amp;gt;&amp;lt;EmployeeID&amp;gt;6126&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Abella, Jude - &amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;6&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus&amp;gt;Pending&amp;lt;/RequestStatus&amp;gt;&amp;lt;MyOrder&amp;gt;1&amp;lt;/MyOrder&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest2" msdata:rowOrder="1"&amp;gt;&amp;lt;EmployeeID&amp;gt;6126&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Abella, Jude - Need New PC&amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;5&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus&amp;gt;Pending&amp;lt;/RequestStatus&amp;gt;&amp;lt;MyOrder&amp;gt;1&amp;lt;/MyOrder&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest3" msdata:rowOrder="2"&amp;gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Wheeler, Darryl - Computer Software&amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;4&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus&amp;gt;Pending&amp;lt;/RequestStatus&amp;gt;&amp;lt;MyOrder&amp;gt;1&amp;lt;/MyOrder&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest4" msdata:rowOrder="3"&amp;gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Wheeler, Darryl - test&amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;3&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus/&amp;gt;&amp;lt;MyOrder&amp;gt;1&amp;lt;/MyOrder&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest5" msdata:rowOrder="4"&amp;gt;&amp;lt;EmployeeID&amp;gt;1100&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Simon, Marcia&amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;99991100&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus/&amp;gt;&amp;lt;MyOrder&amp;gt;2&amp;lt;/MyOrder&amp;gt;&amp;lt;MyOrder2&amp;gt;3&amp;lt;/MyOrder2&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&amp;gt;&amp;lt;dbo_udp_SelectEmployeesWithHardwareSoftwareRequest diffgr:id="dbo_udp_SelectEmployeesWithHardwareSoftwareRequest6" msdata:rowOrder="5"&amp;gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&amp;lt;NameAndRequest&amp;gt;Wheeler, Darryl - test1&amp;lt;/NameAndRequest&amp;gt;&amp;lt;HardwareSoftwareRequestID&amp;gt;1&amp;lt;/HardwareSoftwareRequestID&amp;gt;&amp;lt;RequestStatus&amp;gt;Closed&amp;lt;/RequestStatus&amp;gt;&amp;lt;MyOrder&amp;gt;4&amp;lt;/MyOrder&amp;gt;&amp;lt;/dbo_udp_SelectEmployeesWithHardwareSoftwareRequest&lt;b&gt;&lt;font color="green"&gt;&amp;gt;&amp;lt;Table1 diffgr:id="Table11" msdata:rowOrder="0"&amp;gt;&amp;lt;EmployeeID&amp;gt;3397&amp;lt;/EmployeeID&amp;gt;&amp;lt;FileAs&amp;gt;Wheeler, Darryl&amp;lt;/FileAs&amp;gt;&amp;lt;NTAccount&amp;gt;Dwheeler&amp;lt;/NTAccount&amp;gt;&amp;lt;/Table1&amp;gt;&lt;/font id="green"&gt;&lt;/b&gt;&amp;lt;/DataSet1&amp;gt;&amp;lt;/SelectEmployeesWithHardwareSoftwareRequestResult&amp;gt;&amp;lt;/SelectEmployeesWithHardwareSoftwareRequestResponse&amp;gt;&amp;lt;/dfs:dataFields&amp;gt;&amp;lt;/dfs:myFields&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The green bolded section is the information that I need.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6411.aspx</link><pubDate>Wed, 01 Dec 2004 01:41:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6411</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6411.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6411</wfw:commentRss><description>Each of those namespaces you see need to be defined for the DOM:&lt;br /&gt;&lt;br /&gt;* dfs&lt;br /&gt;* ns4&lt;br /&gt;* ns1&lt;br /&gt;&lt;br /&gt;I'm assuming that there will also be a ns2 and ns3 in there somewhere.&lt;br /&gt;&lt;br /&gt;You must set all of these namespaces at the same time.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6410.aspx</link><pubDate>Tue, 30 Nov 2004 14:25:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6410</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6410.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6410</wfw:commentRss><description>First Off... My stored procedure looks something like this...&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE udp_SelectEmployeesWithHardwareSoftwareRequest&lt;br /&gt;			(@User nvarchar(50))&lt;br /&gt;AS&lt;br /&gt;	SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT&lt;/b&gt;	NameAndRequest&lt;br /&gt;FROM		viewAllEmployeesActive &lt;br /&gt;&lt;br /&gt;&lt;b&gt;UNION&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT &lt;/b&gt;   	tblHardwareSoftwareRequest.RequestedForEmployeeID&lt;br /&gt;FROM         	tblHardwareSoftwareRequest &lt;br /&gt;		&lt;br /&gt;&lt;b&gt;SELECT &lt;/b&gt;EmployeeID, FileAs, NTAccount FROM Emp.dbo.viewAllEmployeesActive viewAllEmployeesActive_1 WHERE NTAccount=@User&lt;br /&gt;&lt;br /&gt;RETURN&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The last select statement is the one that I'm trying to retrieve a value out of.  &lt;br /&gt;&lt;br /&gt;In IP, when I select the data validation and onafterchange it displays a method for onafterchange in the code.  It seems that all I would have to do is grab the string at the beginning of the code, i.e. &lt;br /&gt;&lt;br /&gt;MatchPath:="/dfs:myFields/dfs:dataFields/ns4:SelectEmployeesWithHardwareSoftwareRequestResponse/ns4:SelectEmployeesWithHardwareSoftwareRequestResult/ns1:DataSet1/ns1:Table1/ns1:EmployeeID"&lt;br /&gt;&lt;br /&gt;So it would seem that I could grab everything after the "MatchPath:=" and use it to retrieve the field.  You mentioned that I need to Get the secondary connection.  I've seen several examples within our discussion, but none seem to work.  "ns4" looks like part of the namespace, where ns1 is part of the field.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6409.aspx</link><pubDate>Tue, 30 Nov 2004 00:44:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6409</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6409.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6409</wfw:commentRss><description>You are setting a selection namespace for "ns4" but are trying to use "ns1". Why is that?&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6408.aspx</link><pubDate>Mon, 29 Nov 2004 21:33:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6408</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6408.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6408</wfw:commentRss><description>I attempted what you suggested and I get a syntax error...&lt;br /&gt;&lt;br /&gt;&lt;font color="red"&gt;&lt;b&gt;'selectSingleNode' is ambiguous across the inherited interfaces 'Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument' and 'Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode'.&lt;/b&gt;&lt;/font id="red"&gt;&lt;br /&gt;&lt;br /&gt;This occurs on my 3rd line&lt;br /&gt;&lt;br /&gt;            Dim domFoo As IXMLDOMDocument2 = CType(thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest"), IXMLDOMDocument2)&lt;br /&gt;&lt;br /&gt;            domFoo.setProperty("SelectionNamespaces", "xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1""")&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="red"&gt;            Dim oNode As IXMLDOMNode = domFoo.selectSingleNode("ns1:EmployeeID")&lt;/font id="red"&gt;&lt;/b&gt;</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6407.aspx</link><pubDate>Mon, 29 Nov 2004 21:06:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6407</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6407.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6407</wfw:commentRss><description>I think you two are getting mixed up with the coding languages you are using...&lt;br /&gt;&lt;br /&gt;sakiboy, you started this post using VB.NET (managed code).&lt;br /&gt;jonbrave, you are using JScript.&lt;br /&gt;&lt;br /&gt;The two are not compatible.&lt;br /&gt;&lt;br /&gt;Once again, let me state that you should NEVER set the selection namespaces for thisXDocument.DOM (BAD! BAD! BAD!) InfoPath and Visual Studio do this for you. If you mess with this you will no longer be able to make selections within the main DOM. Just don't do it!&lt;br /&gt;&lt;br /&gt;You want to set the selection namespaces for your secondary data sources ONLY...&lt;br /&gt;&lt;br /&gt;If you are using managed code, do it like this:&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument2 domFoo = (IXMLDOMDocument2)thisXDocument.GetDOM("Foo");&lt;br /&gt;domFoo.setProperty("SelectionNamespaces", "xmlns:abc=\"http://foo.bar.com/abc\""); &lt;br /&gt;IXMLDOMNode oNode = domFoo.selectSingleNode("abc:FieldName");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are using JScript, do it like this:&lt;br /&gt;&lt;br /&gt;var domFoo = XDocument.GetDOM("Foo");&lt;br /&gt;domFoo.setProperty("SelectionNamespaces", 'xmlns:abc="http://foo.bar.com/abc"'); &lt;br /&gt;var oNode = domFoo.selectSingleNode("abc:FieldName");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6406.aspx</link><pubDate>Mon, 29 Nov 2004 20:22:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6406</guid><dc:creator>sakieboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6406.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6406</wfw:commentRss><description>I'm trying your example to see what happens.&lt;br /&gt;&lt;br /&gt;I can't compile it because it doesn't recognize SetProperty as a Method of DOM.&lt;br /&gt;&lt;br /&gt;Defined as&lt;br /&gt;&lt;br /&gt;        Private thisXDocument As XDocument&lt;br /&gt;&lt;br /&gt;            thisXDocument.DOM.setProperty("SelectEmployeesWithHardwareSoftwareRequest", "xmlns:ns4=""http://tempuri.org/WSSelectEmployeesWithHardwareSoftwareRequest/Service1""")&lt;br /&gt;            thisXDocument.GetDOM("SelectEmployeesWithHardwareSoftwareRequest").setProperty("SelectEmployeesWithHardwareSoftwareRequest", thisXDocument.DOM.getProperty("SelectEmployeesWithHardwareSoftwareRequest"))&lt;br /&gt;</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6405.aspx</link><pubDate>Mon, 29 Nov 2004 17:31:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6405</guid><dc:creator>jonbrave</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6405.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6405</wfw:commentRss><description>[Our posts just crossed!]&lt;br /&gt;&lt;br /&gt;[Ooh, look, I got a green star!]&lt;br /&gt;&lt;br /&gt;How's about trying from his example something pretty like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IXMLDOMDocument3 domXML = (IXMLDOMDocument3) objDO.DOM;&lt;br /&gt;domXML.setProperty( "SelectionNamespaces", thisXDocument.DOM.getProperty("SelectionNamespaces"));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Not tried, don't know about casting to (IXMLDOMDocument3), but the gist is I'm setting the secondary's &lt;b&gt;SelectionNamespaces&lt;/b&gt; property to the value of that property on the main DOM.  That's what I do in script:&lt;br /&gt;&lt;br /&gt;// Next line put in by IP&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", ...');&lt;br /&gt;// Next line added by me (for each secondary adapter)&lt;br /&gt;XDocument.GetDOM("LogonToProject").setProperty("SelectionNamespaces", XDocument.DOM.getProperty("SelectionNamespaces"));&lt;br /&gt;</description></item><item><title>Re: Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/6404.aspx</link><pubDate>Mon, 29 Nov 2004 17:24:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6404</guid><dc:creator>jonbrave</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6404.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6404</wfw:commentRss><description>sakieboy,&lt;br /&gt;&lt;br /&gt;I just looked at &lt;b&gt;CodeWzrd&lt;/b&gt;'s suggested link above (which I participated in).  I assume what he said for managed code is what you want.&lt;br /&gt;&lt;br /&gt;The vital bit is:&lt;br /&gt;&lt;pre&gt;IXMLDOMDocument3 domXML = (IXMLDOMDocument3) objDO.DOM;&lt;br /&gt;domXML.setProperty( "SelectionNamespaces", "xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" " + "xmlns:tns=\"http://tempuri.org/\"");&lt;/pre&gt;	&lt;br /&gt;&lt;br /&gt;You need to &lt;b&gt;setProperty&lt;/b&gt; for &lt;b&gt;"SelectionNamespaces"&lt;/b&gt; on the secondary DOM you're using.  That's the important bit.&lt;br /&gt;&lt;br /&gt;You need more namespaces than he shows.  You need &lt;b&gt;ns1&lt;/b&gt;.  Follow?  Either type it in by hand (e.g. I think in your managed code you get all the namespaces declared in &lt;pre&gt;[InfoPathNamespace("...")&lt;/pre&gt; that VS puts against your &lt;b&gt;public class&lt;/b&gt;), or do as I do in that thread above, and copy the namespaces programatically (using &lt;b&gt;getProperty&lt;/b&gt;) from the main DOM.</description></item></channel></rss>