<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Populate query fields from secondary DS</title><link>https://www.infopathdev.com:443/forums/thread/13330.aspx</link><pubDate>Mon, 11 Jul 2005 06:31:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13330</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13330.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13330</wfw:commentRss><description>Hi Agni,&lt;br /&gt;&lt;br /&gt;Thanks a lot for your answer It work great!&lt;br /&gt;&lt;br /&gt;The only things to make for that work is replace the namespacea by your namespaces!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item><item><title>Re: Populate query fields from secondary DS</title><link>https://www.infopathdev.com:443/forums/thread/13329.aspx</link><pubDate>Sun, 10 Jul 2005 19:31:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13329</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13329.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13329</wfw:commentRss><description>Hi Thiery,&lt;br /&gt;You need to set selectionNamespaces property for this dataconnection before calling the connection for selecting the node with an xpath. You can set property this way &lt;br /&gt;IXMLDOMDocument2 oDomSearchHRG = (IXMLDOMDocument2)thisXDocument.GetDOM("searchHRG");&lt;br /&gt;oDomSearchHRG.setProperty("SelectionNamespaces", "xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-02-03T00:56:51\" xmlns:s0=\"http://tempuri.org/\" xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns1=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:ns2=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xd=\"http://schemas.microsoft.com/office/infopath/2003\"");&lt;br /&gt;&lt;br /&gt;oDomSearchHRG.selectSingleNode("/dfs:myFields/dfs:queryFields/ns2:searchHRG/ns2:Amt").text="150";&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: Populate query fields from secondary DS</title><link>https://www.infopathdev.com:443/forums/thread/13328.aspx</link><pubDate>Fri, 08 Jul 2005 13:33:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13328</guid><dc:creator>ScottAtRVC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13328</wfw:commentRss><description>Hi.&lt;br /&gt;&lt;br /&gt;Not really an answer to your namespace error.  But does this XPath work?&lt;br /&gt;thisXDocument.GetDOM("searchHRG").selectSingleNode("//*[local-name()=Amt]").text = "150";&lt;br /&gt;&lt;br /&gt;Cheers.  Scott.</description></item><item><title>Populate query fields from secondary DS</title><link>https://www.infopathdev.com:443/forums/thread/12487.aspx</link><pubDate>Thu, 07 Jul 2005 15:00:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12487</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12487.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12487</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Sorry for all this question but it's the last for today!&lt;br /&gt;&lt;br /&gt;I wan't that in the on load event infopath put me some value in the query fields of one of my datasource.&lt;br /&gt;&lt;br /&gt;In C# i make this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;thisXDocument.GetDOM("searchHRG").selectSingleNode("/dfs:myFields/dfs:queryFields/ns2:searchHRG/ns2:Amt").text="150";&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But that make me an error :&lt;br /&gt;&lt;br /&gt; &lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;Reference to undeclared namespace prefix: 'dfs'.&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;I don't understand because it's define at the beginning of the public class of my infopath?&lt;br /&gt;&lt;br /&gt;I have to declare it one more time but where?&lt;br /&gt;&lt;br /&gt;Thanks a lot one more times for your help it's very appreciate!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item></channel></rss>