<?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: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28392.aspx</link><pubDate>Tue, 29 Apr 2008 20:18:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28392</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28392.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28392</wfw:commentRss><description>&lt;p&gt;I wish you the best on the rest of the project!&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28378.aspx</link><pubDate>Tue, 29 Apr 2008 10:06:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28378</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28378</wfw:commentRss><description>&lt;p&gt;Thanks for answring blogs&lt;/p&gt;
&lt;p&gt;But finally i decided to use &amp;quot;C#&amp;quot; &amp;nbsp;instead of &amp;quot;C#(infopath 2003 Compatible)&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28369.aspx</link><pubDate>Mon, 28 Apr 2008 22:49:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28369</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28369</wfw:commentRss><description>&lt;p&gt;In 2003 coding you would do something like this:&lt;/p&gt;
&lt;p&gt;IXMLDOMNode oXml = thisXDocument.DOM.selectSingleNode(&amp;quot;...xpath to XML Node to be transformed...&amp;quot;);&lt;br /&gt;IXMLDOMNode oXsl = ... // You need to have your XSL loaded into an IXMLDOMDocument, and then select it&amp;#39;s root.&lt;/p&gt;
&lt;p&gt;string transformResults = oXml.transformNode(oXsl);&lt;/p&gt;
&lt;p&gt;- - - - -&lt;/p&gt;
&lt;p&gt;But the big question is this: Is all the rest of your code using the IP03 model, or the IP07 model? If IP03, then great, just get this part working in IP03. If the rest of your code is written in the IP07 model, then the right thing to do is to stop using &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot; and move to using &amp;quot;C#&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28320.aspx</link><pubDate>Mon, 28 Apr 2008 06:10:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28320</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28320.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28320</wfw:commentRss><description>&lt;p&gt;I gone through it,i wont get solution for my query.&lt;/p&gt;
&lt;div class="ForumPostContentText"&gt;
&lt;p&gt;&amp;nbsp;i want to &amp;nbsp;access infopath form and save the XML&amp;nbsp;using &amp;nbsp;&amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;&amp;nbsp;model,which i have implemented in C# &amp;quot;infopath 2007&amp;quot; object model.&lt;/p&gt;
&lt;p&gt;the code for the same using &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;&amp;nbsp;model&amp;nbsp;is as follows.&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;// Transform the InfoPath form and save the XML into the stream for the part&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;trans.Transform(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator(), &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;, partStream);&lt;/p&gt;&lt;/font&gt;&lt;/div&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28295.aspx</link><pubDate>Fri, 25 Apr 2008 16:08:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28295</guid><dc:creator>Albert</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28295.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28295</wfw:commentRss><description>&lt;p&gt;Hi, read : &lt;a href="http://msdn2.microsoft.com/nl-nl/library/aa167871(en-us,office.11).aspx"&gt;http://msdn2.microsoft.com/nl-nl/library/aa167871(en-us,office.11).aspx&lt;/a&gt;&amp;nbsp;and &lt;a href="http://msdn2.microsoft.com/en-us/office/aa905435.aspx"&gt;http://msdn2.microsoft.com/en-us/office/aa905435.aspx&lt;/a&gt;&amp;nbsp;All the information you need is there, you just have to look for it.&lt;/p&gt;
&lt;p&gt;Good luck.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28279.aspx</link><pubDate>Fri, 25 Apr 2008 10:43:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28279</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28279.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28279</wfw:commentRss><description>&lt;p&gt;Then how should i access infopath form and save the XML in &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;&amp;nbsp;,which i have implemented in C# as follows&lt;/p&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;// Transform the InfoPath form and save the XML into the stream for the part&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;trans.Transform(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator(), &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;, partStream);&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28258.aspx</link><pubDate>Thu, 24 Apr 2008 23:22:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28258</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28258.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28258</wfw:commentRss><description>&lt;p&gt;I repeat... there is no way to do this. When you are using &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot; there is no access to the MainDataSource object. It doesn&amp;#39;t exist. It won&amp;#39;t exist.&lt;/p&gt;
&lt;p&gt;You either need to use InfoPath 2003 compatible coding (i.e. thisXDocument.DOM) or you need to switch to use &amp;quot;C#&amp;quot; (the InfoPath 2007 coding model which DOES have MainDataSource).&lt;/p&gt;
&lt;p&gt;To switch you will want to copy your code somewhere, then go to Tools | Form Options | Programming. Click &amp;quot;Remove Code&amp;quot;, and then select &amp;quot;C#&amp;quot;. Then add you code back.&lt;/p&gt;
&lt;p&gt;You CANNOT mix the IP03 and IP07 programming models like you are trying to do.&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28207.aspx</link><pubDate>Thu, 24 Apr 2008 05:25:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28207</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28207.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28207</wfw:commentRss><description>&lt;p&gt;I want to access infopath form using following code,Is there any alternative for &amp;quot;&lt;font color="#0000ff"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator()&amp;quot; in &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Please suggest some alternative way.&lt;/p&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;// Transform the InfoPath form and save the XML into the stream for the part&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;trans.Transform(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator(), &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;, partStream);&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28182.aspx</link><pubDate>Wed, 23 Apr 2008 16:23:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28182</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28182.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28182</wfw:commentRss><description>&lt;p&gt;You don&amp;#39;t when using &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;. You need to use &amp;quot;C#&amp;quot; and not &amp;quot;C# (InfoPath 2003 Compatible)&amp;quot;. They are very different programming models. The one you have currently selected knows nothing about &amp;quot;MainDataSource&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28118.aspx</link><pubDate>Tue, 22 Apr 2008 05:04:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28118</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28118.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28118</wfw:commentRss><description>&lt;p&gt;How to access &amp;nbsp;&amp;quot;MainDataSource.CreateNavigator()&amp;quot; in C# (InfoPath 2003 Compatible).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28114.aspx</link><pubDate>Mon, 21 Apr 2008 23:49:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28114</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28114.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28114</wfw:commentRss><description>&lt;p&gt;I normally just use &amp;quot;MainDataSource&amp;quot; rather than &amp;quot;this.MainDataSource&amp;quot; and it works just fine.&lt;/p&gt;
&lt;p&gt;Double-check in your Tools | Form Options&amp;nbsp;| Programming dialog box to make sure you are set to &amp;quot;C#&amp;quot; and not some other option.&lt;/p&gt;</description></item><item><title>How to access MainDataSource Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/28080.aspx</link><pubDate>Mon, 21 Apr 2008 10:30:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28080</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28080.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=28080</wfw:commentRss><description>&lt;p&gt;I could not access this.MainDataSource propery in my C# Code.&lt;/p&gt;
&lt;p&gt;I have added all the required references.Though getting error &lt;/p&gt;
&lt;p&gt;Error&amp;nbsp;5&amp;nbsp;&amp;#39;LMC.FormCode&amp;#39; does not contain a definition for &amp;#39;MainDataSource&amp;#39;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,......&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>