<?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>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Insert Stored Procedure With Select - No records in select</title><link>https://www.infopathdev.com:443/forums/thread/102679.aspx</link><pubDate>Thu, 28 May 2015 15:37:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:102679</guid><dc:creator>Omkara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/102679.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=102679</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am using&amp;nbsp; stored procedure which does insert followed by a select statement.&lt;/p&gt;&lt;p&gt;I had really hard time to get the infopath form to use the stored procedure&amp;nbsp; after countless hours of searching online and following things i was able to get the stored procedure to be called.&lt;/p&gt;&lt;p&gt;Strange thing is it does the insert but i do not see the result set of select query, the same stored procedure works fine in SSMS&lt;/p&gt;&lt;p&gt;&amp;nbsp;I have Set IMPLICIT_TRANSACTIONS OFF in stored proc&lt;/p&gt;&lt;p&gt;Below is the code for stored procedure &lt;br /&gt;&lt;/p&gt;&lt;p&gt;IF NOT EXISTS(SELECT TOP 1 Id from testtable where Id= @ID) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; --INSERT HERE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO&amp;nbsp;&amp;nbsp;&amp;nbsp; [dbo].testtable(Id)&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;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES&amp;nbsp;&amp;nbsp;&amp;nbsp; (@ID)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; COMMIT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Select Id from [dbo].testtable&amp;nbsp; where Id = @ID&lt;/p&gt;&lt;p&gt;&lt;br /&gt;In Infopath form i use the below code and i get null&lt;br /&gt;&lt;/p&gt;&lt;p&gt;XPathNavigator myNavigator =&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.DataSources[&amp;quot;testtable&amp;quot;].CreateNavigator().SelectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields&amp;quot;, this.NamespaceManager)&amp;nbsp; &lt;/p&gt;&lt;p&gt;I really appreciate a quick response.&lt;/p&gt;&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>