﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Transaction Error</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 18 May 2026 07:14:50 GMT</lastBuildDate><ttl>20</ttl><item><title>Transaction Error</title><link>http://forum.strataframe.net/FindPost23009.aspx</link><description>After update for VS2008 and SQL2008, the operations with transaction present the error below.&lt;BR&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;public void TesteTransacao()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (NCClubeBO.TbClubeBO loBO = new NCClubeBO.TbClubeBO())&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;loBO.FillAll();&lt;/P&gt;&lt;P&gt;&amp;nbsp;try&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Business.BusinessLayer.TransactionBegin("", System.Data.IsolationLevel.ReadCommitted);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (loBO.Count &amp;gt; 0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (loBO.MoveFirst())&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; loBO.Edit(false);&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; loBO.NomeClube = loBO.NomeClube;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (loBO.MoveNext());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loBO.Save(true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;FONT color=#ff1111&gt;MicroFour.StrataFrame.Business.BusinessLayer.TransactionCommit("");&lt;/FONT&gt;&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("OK");&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;catch(Exception err)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Business.BusinessLayer.TransactionRollback("");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(err.Message);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;InvalidOperationException&lt;BR&gt;&amp;nbsp; Este SqlTransaction foi concluído; ele não pode mais ser usado.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : System.Data&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Data.SqlClient.SqlTransaction.ZombieCheck()&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Data.SqlClient.SqlTransaction.Rollback()&lt;BR&gt;&amp;nbsp;&amp;nbsp; em MicroFour.StrataFrame.Data.DbDataSourceItem.TransactionEnd(String TransactionKey, Boolean IsCommit)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em MicroFour.StrataFrame.Data.DbDataSourceItem.TransactionRollback(String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em MicroFour.StrataFrame.Data.DataLayer.TransactionRollback(String DataSourceKey, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em MicroFour.StrataFrame.Business.BusinessLayer.TransactionRollback(String DataSourceKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em NCClube.OtherClass.Class1.TesteTransacao() na C:\Users\Administrador\Documents\Visual Studio 2008\Projects\StrataFrameProjects\NCClube\NCClube\OtherClass\Class1.cs:linha 36&lt;BR&gt;&amp;nbsp;&amp;nbsp; em NCClube.FormMain.cmdTbClube_Click(Object sender, EventArgs e) na C:\Users\Administrador\Documents\Visual Studio 2008\Projects\StrataFrameProjects\NCClube\NCClube\FormMain.cs:linha 64&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.ToolStripDropDown.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; em System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;</description><pubDate>Tue, 12 May 2009 11:52:25 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23084.aspx</link><description>Ok... Thank you!!! Very much...&lt;P&gt;:P ;)</description><pubDate>Tue, 12 May 2009 11:52:25 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23071.aspx</link><description>OK, there is no need to post a sample.&amp;nbsp; We found what was going on.&amp;nbsp; I have just posted a new build that will correct this issue.&amp;nbsp; If you are not using SPROCS for inserts and updates the reader was getting closed.&amp;nbsp; If you load the new update this issue should be taken care of.&amp;nbsp; Sorry for any trouble!</description><pubDate>Mon, 11 May 2009 13:40:59 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23065.aspx</link><description>Rogerio,&lt;/P&gt;&lt;P&gt;Is it possible for you to write a simple WinForms sample that reproduces this error?&amp;nbsp; We are doing this very thing and not having any issues.&amp;nbsp; So there must be something else within your environment that is not being introduced into our test.&amp;nbsp; Thanks.</description><pubDate>Mon, 11 May 2009 08:47:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23041.aspx</link><description>[quote][b]Trent L. Taylor (05/06/2009)[/b][hr]So you are saying that when you call the TransactionCommit you are getting the error, correct?&amp;nbsp;&amp;nbsp;[/quote]&lt;P&gt;&lt;STRONG&gt;Yes!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Platform of development&lt;BR&gt;- Windows Server 2008&lt;BR&gt;- SQL Server 2008 (Standard Edition or/and Express)&lt;BR&gt;- Visual Studio 2008 (Professional Edition)&lt;BR&gt;- .NET Framework 3.5 SP1&lt;BR&gt;- StrataFrame 1.6.7&lt;/P&gt;&lt;P&gt;Platform of the user of the program&lt;BR&gt;- Windows XP/200x&lt;BR&gt;- .NET Framework 3.5 SP1&lt;BR&gt;- SQL Server 2005/2008 (Standard or Express)&lt;/P&gt;&lt;P&gt;Before, it functioned perfectly. After to modify the environment of development for VS2008&amp;nbsp;(.NET Framework 3.5 SP1) with SQL2008 the problem appeared, as much in the environment of development as in the production environment.&lt;BR&gt;</description><pubDate>Thu, 07 May 2009 09:12:20 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23028.aspx</link><description>So you are saying that when you call the TransactionCommit you are getting the error, correct?&amp;nbsp; Are you using the Enterprise Server?&amp;nbsp; What database are you using?</description><pubDate>Wed, 06 May 2009 08:45:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23017.aspx</link><description>Hi,&lt;br&gt;
I am having exactly the same error message as you posted. &lt;br&gt;
However, in my case, I found that it is [b]NOT[/b] the actual error. The actual cause is an error occurred during BO.Save(true); the transaction.Connection is somehow become null. &lt;br&gt;
&lt;br&gt;
Then, same as your code, I have exception catch and TransactionRollback() is called. As transaction.Connection is null, TransactionRollback() will throw SqlTransaction has completed and can not be used.&lt;br&gt;
&lt;br&gt;</description><pubDate>Mon, 04 May 2009 20:26:07 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23014.aspx</link><description>P.S.&lt;P&gt;In the detail of the error the reference is for ' roollback'. However, the error already occurs in the call ' commit' (inside of the&amp;nbsp;'try' block). In the example I captured the message presented for the StrataFrame in the call to ' roollback' , in the&amp;nbsp;'catch' block. I wait that you have understood. :)</description><pubDate>Mon, 04 May 2009 14:30:15 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23013.aspx</link><description>Sorry...&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"This SqlTransaction was concluded; it cannot more used being."&lt;/EM&gt;</description><pubDate>Mon, 04 May 2009 14:17:56 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>RE: Transaction Error</title><link>http://forum.strataframe.net/FindPost23010.aspx</link><description>What does the exception say in English?</description><pubDate>Mon, 04 May 2009 11:32:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>