<?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>Re: Implicit Transaction</title><link>https://www.infopathdev.com:443/forums/thread/35365.aspx</link><pubDate>Fri, 05 Dec 2008 13:19:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35365</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35365.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=35365</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Here is the code to execute StoreProcedure,&lt;/p&gt;
&lt;p&gt;SqlCommand command =&amp;nbsp; new SqlCommand(&amp;quot;dbo.SaveSQLComplexDBinfo&amp;quot;, sqlConnection);&lt;/p&gt;
&lt;p&gt;command.CommandType = System.Data.CommandType.StoredProcedure;&lt;/p&gt;
&lt;p&gt;command.Parameters.Add(&amp;quot;@SQLComplexDBID&amp;quot;, SqlDbType.Int).Value = &amp;quot;96&amp;quot;;&lt;/p&gt;
&lt;p&gt;command.Parameters.Add(&amp;quot;@SQLComplexDBID&amp;quot;, SqlDbType.Int).Value = &amp;quot;SQLDA-CX02&amp;quot;;&lt;/p&gt;
&lt;p&gt;command.Parameters.Add(&amp;quot;@ComplexName &amp;quot;, SqlDbType.Int).Value = &amp;quot;ATT25&amp;quot;;&lt;/p&gt;
&lt;p&gt;command.Parameters.Add(&amp;quot;@DBName&amp;quot;, SqlDbType.Int).Value = &amp;quot;ACTT&amp;quot;;&lt;/p&gt;
&lt;p&gt;int i = command.ExecuteNonQuery();&lt;/p&gt;</description></item><item><title>Implicit Transaction</title><link>https://www.infopathdev.com:443/forums/thread/35034.aspx</link><pubDate>Fri, 28 Nov 2008 21:20:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35034</guid><dc:creator>AliMalek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35034.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=35034</wfw:commentRss><description>&lt;p&gt;I use something like the following code when I need to save data fields on SQL Server:&lt;/p&gt;
&lt;p&gt;XDocument.QueryAdapter.Command = &amp;quot;exec dbo.SaveSQLComplexDBinfo &amp;quot; + SQLComplexDBID + &amp;quot;,&amp;#39;&amp;quot; + ComplexName + &amp;quot;&amp;#39;,&amp;#39;&amp;quot; + DBName + &amp;quot;&amp;#39;,&amp;#39;&amp;quot; + AppCode + &amp;quot;&amp;#39;&amp;quot;; &lt;br /&gt;XDocument.Query(); &lt;/p&gt;
&lt;p&gt;When I check database activity, I see that something like this will be issued to SQL Server:&lt;/p&gt;
&lt;p&gt;set implicit_transactions on SET NO_BROWSETABLE ON&lt;br /&gt;exec dbo.SaveSQLComplexDBinfo 96,SQLDA-CX02&amp;#39;,&amp;#39;ATT25&amp;#39;,&amp;#39;ACTT&amp;#39;&lt;br /&gt;IF @@TRANCOUNT &amp;gt; 0 ROLLBACK TRAN&lt;/p&gt;
&lt;p&gt;I need the data to be saved. Why does Query() method wrap the actual query in a transaction and how can I prevent that?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>