<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problems while Submitting to Sharepoint Library Using Code</title><link>https://www.infopathdev.com:443/forums/thread/50170.aspx</link><pubDate>Fri, 25 Dec 2009 06:01:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50170</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50170.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=50170</wfw:commentRss><description>&lt;p&gt;it seems that you dont have access to the other document libary. try giving yourself access to other document libary and see if that works&lt;/p&gt;</description></item><item><title>Problems while Submitting to Sharepoint Library Using Code</title><link>https://www.infopathdev.com:443/forums/thread/50160.aspx</link><pubDate>Thu, 24 Dec 2009 13:58:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50160</guid><dc:creator>WGoeman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50160.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=50160</wfw:commentRss><description>&lt;p&gt;i am now at work on the MOSS but when i use this code:&lt;/p&gt;
&lt;p&gt;&lt;span style="COLOR:green;"&gt;//conection with this adress as the form library &amp;quot;http://Sharepoint/sites/pilot/Urendeclaratie&amp;quot;&lt;/span&gt;&lt;br /&gt;FileSubmitConnection fc = (FileSubmitConnection)&lt;span style="COLOR:blue;"&gt;this&lt;/span&gt;.DataConnections[&lt;span style="COLOR:#a31515;"&gt;&amp;quot;Submit&amp;quot;&lt;/span&gt;]; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc.FolderUrl = SPContext.Current.Web.Url.ToString() + &lt;span style="COLOR:#a31515;"&gt;&amp;quot;/verwerken&amp;quot;&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR:green;"&gt;//a submap in the library&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc.Execute();&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;now i want to put the form into differens maps in that library.&lt;br /&gt;but i get this error&lt;br /&gt;&lt;br /&gt;System.NullReferenceException&lt;br /&gt;Object reference not set to an instance of an object.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at declaratie_met_code4.FormCode.FormEvents_Submit(Object sender, SubmitEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent pEvent)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent)&lt;br /&gt;&lt;br /&gt;this even occurs when i use this setup:&lt;br /&gt;http://Sharepoint/sites/pilot&amp;nbsp;&amp;nbsp;&amp;nbsp; as the DataConnection Adress&lt;br /&gt;&lt;br /&gt;/Urendeclaratie&amp;nbsp;&amp;nbsp; as the fc.FolderUrl extra&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;i tried putting the http://Sharepoint/sites/pilot/Urendeclaratie/verwerken directly in the DataConnection and then i am&amp;nbsp;asked for a Login.&lt;br /&gt;and my own credentials does not work.&lt;br /&gt;&lt;br /&gt;so i searched the web for a way to submit anonymously and found this site (&lt;a href="http://blog.metrostarsystems.com/2009/06/04/anonymously-submit-infopath-form-to-sharepoint-library/"&gt;&lt;font color="#0066dd"&gt;http://blog.metrostarsystems.com/2009/06/04/anonymously-submit-infopath-form-to-sharepoint-library/&lt;/font&gt;&lt;/a&gt;) but this also doesn&amp;#39;t work (cant set the anonymous login)&lt;br /&gt;but becauce i dont want to submit it anonymous i have to find another way to solve this.&lt;br /&gt;&lt;br /&gt;any suggestions??&lt;/p&gt;</description></item></channel></rss>