<?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: How to submit via more than one data connection AND run custom code?</title><link>https://www.infopathdev.com:443/forums/thread/45476.aspx</link><pubDate>Wed, 05 Aug 2009 20:06:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45476</guid><dc:creator>lenovo27</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45476.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=45476</wfw:commentRss><description>&lt;p&gt;No, I don&amp;#39;t believe it precludes you from using rules to submit to a DB and email, and running code. In Tools, Submit Options, rather than selecting a data connection for the submit from the drop down menu, click the radio button that says perform custom actions using rules then click teh rules button to the right of it. Create a rule to submit via email and another rule to submit to your DB in either order. Using VSTA you should still be able to write code in your application to execute the code you need to run&amp;nbsp;onclick of the submit button.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to submit via more than one data connection AND run custom code?</title><link>https://www.infopathdev.com:443/forums/thread/40882.aspx</link><pubDate>Wed, 22 Apr 2009 22:31:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40882</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40882.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=40882</wfw:commentRss><description>&lt;p&gt;Here is some sample jscript from MSDN that submits with an email adapter:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;var objEmailAdapter;&lt;br /&gt;objEmailAdapter = XDocument.DataAdapters(&amp;quot;Email Submit&amp;quot;); &lt;br /&gt;objEmailAdapter.To = &amp;quot;&lt;a href="mailto:list@example.com"&gt;list@example.com&lt;/a&gt;&amp;quot;;&lt;br /&gt;objEmailAdapter.Subject = &amp;quot;Status Report&amp;quot;;&lt;br /&gt;objEmailAdapter.Submit(); &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You can replace &amp;quot;Email Submit&amp;quot; with the name of your email submit connection. This sample also sets the To and Subject, but if you&amp;#39;ve set that up in your email submit, you can skip those lines. More info &lt;a href="http://msdn.microsoft.com/en-us/library/bb229853.aspx"&gt;here&lt;/a&gt; on MSDN.&lt;/p&gt;</description></item><item><title>How to submit via more than one data connection AND run custom code?</title><link>https://www.infopathdev.com:443/forums/thread/40807.aspx</link><pubDate>Tue, 21 Apr 2009 18:23:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40807</guid><dc:creator>kminor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40807.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=40807</wfw:commentRss><description>&lt;p&gt;Hello, I&amp;#39;ve got two data connections set up in my form.&amp;nbsp; The first submits to an Access DB, and the second e-mails the form.&amp;nbsp; I&amp;#39;d like to submit to both of these connections; however, I also have some code that needs to run on submit.&amp;nbsp; Seems like that precludes using rules for the submit.&lt;/p&gt;
&lt;p&gt;Previously, I had only the main connection (no e-mail data connection) set up, and I used XDocument.Submit at the end of my code to perform the submit.&amp;nbsp; If I do that now, with the two data connections, it only submits via the main connection.&amp;nbsp; I could use XDocument.UI.ShowMailItem in my code, but I need control over the name of the attachment.&amp;nbsp; I can get that from the e-mail data connection but not from the ShowMailItem method, if I&amp;#39;m not mistaken.&lt;/p&gt;
&lt;p&gt;Is there a way to get at what I&amp;#39;m trying to do?&amp;nbsp; Web services aren&amp;#39;t an option for me.&lt;/p&gt;</description></item></channel></rss>