﻿<?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 » Business Objects and Data Access (How do I?)  » Transactions Error: DEF_TRANS_KEY has not been started</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 09:27:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17105.aspx</link><description>Here is my code:&lt;/P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; UpdateAspireForTransfer()&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionBegin(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Aspire"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IsolationLevel&lt;/FONT&gt;&lt;FONT size=2&gt;.ReadCommitted);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Retrieve the next Batch ID&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; mBatchID = GetNextBatchID();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AssignBatchID(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateCommissions(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionCommit(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Aspire"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateDynamicsForTransfer(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionRollback(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Aspire"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;throw&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;For some reason, yet unknown to me, the TransactionRollBack gets called and generates an error: &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;A transaction with the key [DEF_TRANS_KEY] has not been started.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;and&amp;nbsp;this stack trace:&lt;BR&gt;&lt;FONT face=Arial size=2&gt;&lt;BR&gt;at MicroFour.StrataFrame.Data.DbDataSourceItem.TransactionEnd(String TransactionKey, Boolean IsCommit)&lt;BR&gt;at MicroFour.StrataFrame.Data.DbDataSourceItem.TransactionRollback(String TransactionKey)&lt;BR&gt;at MicroFour.StrataFrame.Business.BusinessLayer.TransactionRollback(String DataSourceKey)&lt;BR&gt;at Aspire.Accounting.Invoicing.UpdateAspireForTransfer()&lt;BR&gt;at Aspire.Accounting.Invoicing.TransferTSB_Click(Object sender, EventArgs e)&lt;BR&gt;at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)&lt;BR&gt;at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;at System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=2&gt;So, what am I doing wrong?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Thanks, for straightening me out,&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 18 Jun 2008 11:22:16 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17148.aspx</link><description>So far, the testing has gone quite well with this new code.&amp;nbsp; If anyone can see where I need improvements, please let me know.&amp;nbsp; Otherwise, I am running with this.&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR&gt;Bill</description><pubDate>Wed, 18 Jun 2008 11:22:16 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17147.aspx</link><description>The docs are a little ambiguous on this issue (see Using Transactional Processing); however, it appears that only one DB is involved per transaction.&amp;nbsp; I am formulating this conclusion from the fact that a datasourcekey is passed to the transaction methods.&amp;nbsp; So, I will need to be a bit creative in order to get two transactions going...if the second gets rolledback, then the first must be rolledback, too.&lt;/P&gt;&lt;P&gt;In my&amp;nbsp;simplified/summarized/clipped code, I was thinking of doing something like this:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; UpdateFirstDB()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionBegin(MyPrimaryBO.DataSourceKey, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IsolationLevel&lt;/FONT&gt;&lt;FONT size=2&gt;.ReadCommitted);&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . . . do some processing on a bunch of BOs in the primary&amp;nbsp;data source . . .&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateSecondDB();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionCommit(MyPrimaryBO.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;catch&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionRollback(MyPrimaryBO.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;throw&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;The secondary transaction looks quite similar:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; UpdateSecondDB()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionBegin(MySecondaryBO.DataSourceKey, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IsolationLevel&lt;/FONT&gt;&lt;FONT size=2&gt;.ReadCommitted);&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . . . do some processing on a bunch of BOs in the&amp;nbsp;secondary&amp;nbsp;data source . . .&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionCommit(MySecondaryBO.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;catch&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionRollback(MySecondaryBO.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;throw&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Since the second transaction is wrapped inside the first, then any errors from the second should 1) Rollback the second transaction; 2) Bubble up the error which is caught inside the first transaction; 3) Rollback the first transaction; 4) Run my unhandled exception routine.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Am I thinking clearly enough on this?&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Wed, 18 Jun 2008 10:18:25 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17146.aspx</link><description>As I am re-working the transaction thingy, I was wondering, can one transaction cover data changes on two different databases?</description><pubDate>Wed, 18 Jun 2008 09:56:40 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17145.aspx</link><description>Ok, now that Edhy helped me solve an underlying issue with the primary keys and identity columns, I am going to attempt the use of transactions again.&amp;nbsp; Since many others are using these successfully, and I am just an average joe :D, then these should work for me, too.&amp;nbsp; Their use in the current procedure will go a long way to help me when things get a little messed up.&lt;/P&gt;&lt;P&gt;Ya, I know, it is rare for things to get messed up, but we should always prepare for the remote possibility, eh? ;)&lt;/P&gt;&lt;P&gt;Hangin' in there,&lt;BR&gt;Bill</description><pubDate>Wed, 18 Jun 2008 09:38:25 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17132.aspx</link><description>Transactions are a commonly used portion of the framework, but the one thing ab out using trans is environment....so this is one of those things that you may have to supply a sample so that we can see first hnd what is going on.&amp;nbsp; Sorry :ermm:</description><pubDate>Tue, 17 Jun 2008 20:05:07 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17124.aspx</link><description>I am removing transactions within the code.&amp;nbsp; This would be a perfect place for them, but I cannot get them to work.&lt;/P&gt;&lt;P&gt;Once I removed them, I ran into another problem which I will address in a separate thread.&lt;/P&gt;&lt;P&gt;Bill</description><pubDate>Tue, 17 Jun 2008 13:53:12 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17123.aspx</link><description>Still not working.&lt;/P&gt;&lt;P&gt;A transaction with the key [DEF_TRANS_KEY] has not been started.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; UpdateAspireForTransfer()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Retrieve the next Batch ID&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; mBatchID = GetNextBatchID();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssignBatchID(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionBegin(invoicesCurrentBO1.DataSourceKey, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IsolationLevel&lt;/FONT&gt;&lt;FONT size=2&gt;.ReadCommitted);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateCommissions(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionCommit(invoicesCurrentBO1.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateDynamicsForTransfer(mBatchID);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;catch&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessLayer&lt;/FONT&gt;&lt;FONT size=2&gt;.TransactionRollback(invoicesCurrentBO1.DataSourceKey);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;throw&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;The AssignBatchID method assigns a batch ID to the selected invoices.&amp;nbsp; This was included in the transaction, but I pulled it out and am performing some checks to make sure I am not adding an invalid batch ID.&amp;nbsp; Then, I fire up a transaction.&amp;nbsp; It is assigned the DataSourceKey from my InvoicesCurrentBO (which happens to be "Aspire").&amp;nbsp; The CreateCommissions method simply loops through the invoices selected and adds an entry to the Commissions table, if applicable.&amp;nbsp; If all is well, the transaction should then commit.&amp;nbsp; It does not.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I am thinking that a transaction cannot commit if there are no additions or&amp;nbsp;changes to actually commit.&amp;nbsp; In the run I am testing there happens to be no commissions assigned, so there are no transactions to commit.&amp;nbsp; Should I be checking for that first, then committing?&amp;nbsp; Or, is there something else going on?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Please help,&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 17 Jun 2008 12:38:43 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17122.aspx</link><description>Thanks, Ben!&lt;/P&gt;&lt;P&gt;ReadCommitted is definitely the safer approach.&amp;nbsp; I will try to stick with that and work around my transaction issues another way.&lt;/P&gt;&lt;P&gt;Bill</description><pubDate>Tue, 17 Jun 2008 10:57:30 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17121.aspx</link><description>Here's a good article describing the different isolation levels that are available for you to use:&amp;nbsp; &lt;A href="http://msdn.microsoft.com/en-us/library/ms173763.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms173763.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, using ReadCommitted can cause locking issues if you try to read the record again after you have updated it, but before you have committed the transaction.&lt;/P&gt;&lt;P&gt;As for why an exception is being thrown causing the rollback to occur, it is most likely that you need to change your Save() calls on your busines object to call Save(True, "Aspire") so that the business objects are saved on the transaction that you have started.&amp;nbsp; If you just call Save(True), the business objects will be saved on the "default" transaction, not the "Aspire" transaction.</description><pubDate>Tue, 17 Jun 2008 09:33:00 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17110.aspx</link><description>I changed all of the save methods to include the true parameter.&amp;nbsp; Now, I am getting a timeout error.&amp;nbsp; Does the ReadCommitted IsolationLevel place a lock on any records that were updated, essentially blocking further calls to that record?&amp;nbsp; Is there another IsolationLevel that I should be using?</description><pubDate>Mon, 16 Jun 2008 15:42:47 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Transactions Error: DEF_TRANS_KEY has not been started</title><link>http://forum.strataframe.net/FindPost17106.aspx</link><description>Does this additional code help?&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; AssignBatchID(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; pBatchID)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// attach the batch number to only the selected invoice records&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; i = 0; i &amp;lt; invselection.SelectedCount; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;InvoicesCurrentBO&lt;/FONT&gt;&lt;FONT size=2&gt; mCurrInvoice = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;InvoicesCurrentBO&lt;/FONT&gt;&lt;FONT size=2&gt;)invselection.GetSelectedRow(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;InvoiceMasterBO&lt;/FONT&gt;&lt;FONT size=2&gt; mInvMasterBO = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;InvoiceMasterBO&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mInvMasterBO.FillByPrimaryKey(mCurrInvoice.invoiceindex);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (mInvMasterBO.Count &amp;gt; 0)&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;&amp;nbsp; mInvMasterBO.Edit();&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; mInvMasterBO.batchid = pBatchID;&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; mInvMasterBO.Save();&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; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I am thinking that the Save() method needs to reflect transactions, like this: mInvMasterBO.Save(&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;If I replace that method parameter whereever a save occurs inside that transaction, will that fix the error?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 16 Jun 2008 14:47:09 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>