<?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: Insert Infopath repeating section data into database using C#</title><link>https://www.infopathdev.com:443/forums/thread/63815.aspx</link><pubDate>Wed, 02 Feb 2011 17:25:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63815</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63815.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=63815</wfw:commentRss><description>&lt;p&gt;Does your stored procedure require any paramaters? Where does it get the data it is supposed to be inserting into the database?&lt;/p&gt;</description></item><item><title>Insert Infopath repeating section data into database using C#</title><link>https://www.infopathdev.com:443/forums/thread/63799.aspx</link><pubDate>Wed, 02 Feb 2011 11:27:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63799</guid><dc:creator>Alok Singla</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63799.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=63799</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I am new to infopath and trying to insert some data from infopath to sql server 2005 using c-sharpe. After looking into number of posts, i have found some sample code and tried. &lt;/p&gt;
&lt;p&gt;For this, i have created a new&amp;nbsp;Data connection in Form with Receiving Data Option and created&amp;nbsp;a stored procedure&amp;nbsp;with only a&amp;nbsp;insert statement. I am using below sample of code.&amp;nbsp;&lt;/p&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;AdoQueryConnection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; connection = (&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;AdoQueryConnection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)DataConnections[&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;FolderScan&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;];&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; originalCommand = connection.Command;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;connection.Command = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;EXECUTE procFolderScan&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;connection.Execute();&lt;/p&gt;
&lt;p&gt;But above code is not inserting anything in the database. but if i execute my stored procedure from Sql Server management studio with same credentials, it executed the procedure. &lt;/p&gt;
&lt;p&gt;Please suggest me, what is wrong in the above code.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>