﻿<?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 » Issues  » Timeout Saving on a Transaction</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 12:41:41 GMT</lastBuildDate><ttl>20</ttl><item><title>Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9625.aspx</link><description>In my application I'm having an issue with saving BOs that have a parent/child relationship on a transaction. To simplify things for testing I created&amp;nbsp;two BOs, ParentBO1 and ChildBO1 and defined a parent/child relationship between them. I dropped the BOs on to a standard SF form and excluded them from the form save, delete, undo etc. form events. I'm not using any stored procedures and have concurrency checking as OptimisticAllFields.&lt;P&gt;On the form I have the following save method:&lt;/P&gt;&lt;P&gt;Private Sub SaveAllOnTransaction()&lt;BR&gt;&amp;nbsp; Try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessLayer.TransactionBegin("", Data.IsolationLevel.ReadCommitted)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Save objects&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ParentBO1.Save(True)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ChildBO1.Save(True)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Commit Transaction&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BusinessLayer.TransactionCommit("")&lt;BR&gt;&amp;nbsp; Catch ex As Exception&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Rollback transaction&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessLayer.TransactionRollback("")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Show inner exception&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.InnerException.Message)&lt;BR&gt;&amp;nbsp; End Try&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;The test form simply loads the Parent and Child BOs, places the Parent in edit mode and displays a list view of child objects that may be selected for editing or new child objects may be added using a ChildFormDialog.&lt;/P&gt;&lt;P&gt;If I simply edit the ParentBO and save, everything works okay. If I leave the ParentBO alone (Although it is marked as IsDirty since it was placed in editing mode) and modify or add a child record and save, everything works okay. However if I modify both the Parent and Child BOs and try to save, the program hangs and eventually an exception is thrown saying&amp;nbsp;"Timeout expired. The timeout period elapsed prior to completion of the operation or&amp;nbsp;the server is not responding.".&lt;P&gt;Modifying the save method as follows eliminates the error.&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'-- Save objects&lt;BR&gt;&amp;nbsp;&amp;nbsp; If Me.ChildBO1.IsDirty Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ChildBO1.Save(True)&lt;BR&gt;&amp;nbsp;&amp;nbsp; ElseIf Me.ParentBO1.IsDirty Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ParentBO1.Save(True)&lt;BR&gt;&amp;nbsp;&amp;nbsp; End If&lt;P&gt;It would appear that the framework is trying to save the ParentBO twice, if there are actual changes to the ParentBO and ChildBO causing an error when saving the Parent a second time under a transaction. I know that the framework is designed to save the Parent when a child is saved. but it is not recognizing that the child has already saved the parent when Save(true) is called on the parent. This is only&amp;nbsp;an issue when objects with a parent/child relationship are saved on a transaction. I'm using v1.61&lt;P&gt;-Larry</description><pubDate>Fri, 13 Jul 2007 17:30:51 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10286.aspx</link><description>ROFL</description><pubDate>Fri, 13 Jul 2007 17:30:51 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10281.aspx</link><description>Here we go again... :exclamationmark:</description><pubDate>Fri, 13 Jul 2007 13:36:43 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10279.aspx</link><description>Hey Larry....you come back to Amarillo anytime...beer is on me ;)</description><pubDate>Fri, 13 Jul 2007 12:54:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10276.aspx</link><description>I'll settle for a beer the next time I'm in Amarillo ;)</description><pubDate>Fri, 13 Jul 2007 12:15:35 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10245.aspx</link><description>Well, there is a cement truck that would be easy to mail...it's in some very small pieces (some assembly required)  :w00t:</description><pubDate>Thu, 12 Jul 2007 19:44:28 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10235.aspx</link><description>Doesn't he get a prize?</description><pubDate>Thu, 12 Jul 2007 09:32:08 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10230.aspx</link><description>Congrats to Larry for getting the 10000th post on the forum.&amp;nbsp; Pretty cool ;)</description><pubDate>Thu, 12 Jul 2007 09:17:08 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10030.aspx</link><description>Cement Truck was awesome.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.metacafe.com/watch/223919/mythbusters_blow_up_a_cement_truck/"&gt;http://www.metacafe.com/watch/223919/mythbusters_blow_up_a_cement_truck/&lt;/A&gt;</description><pubDate>Fri, 06 Jul 2007 10:44:39 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10021.aspx</link><description>Yeah, that cement truck explosions was huge!&amp;nbsp; There was practically nothing left! :D</description><pubDate>Fri, 06 Jul 2007 09:45:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10019.aspx</link><description>The one episode that stays with me is when they blew up the cement truck.&amp;nbsp; Another good one was the exploding pants:D</description><pubDate>Fri, 06 Jul 2007 09:37:29 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10011.aspx</link><description>Which episode do you guys like most?&lt;/P&gt;&lt;P&gt;I love the one they shoot chickens all over the place... :D</description><pubDate>Thu, 05 Jul 2007 18:10:35 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost10000.aspx</link><description>Lately MythBusters is about the only thing my cable provider has that is worth watching. I've considered buying a plasma TV now that they're so cheap, but there seems to be a shortage of good "software" to go with it ;)</description><pubDate>Thu, 05 Jul 2007 16:20:58 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9997.aspx</link><description>COOL!&amp;nbsp; That episode I want to see! :D</description><pubDate>Thu, 05 Jul 2007 16:08:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9996.aspx</link><description>The more&amp;nbsp;I thought about&amp;nbsp;I realized&amp;nbsp;it would be better&amp;nbsp;mail it to MythBusters and see if they could blow it up.:w00t:&amp;nbsp;&amp;nbsp;</description><pubDate>Thu, 05 Jul 2007 15:50:08 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9993.aspx</link><description>It must be adrift now ;)</description><pubDate>Thu, 05 Jul 2007 15:06:15 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9989.aspx</link><description>What about your boat now?</description><pubDate>Thu, 05 Jul 2007 13:36:40 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9987.aspx</link><description>Thanks Larry&lt;/P&gt;&lt;P&gt;I was in the process of tying a rope to my&amp;nbsp;machine (To better use it as an anchor for my boat) when I noticed&amp;nbsp;that this was the same issue I was having.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for saving me&amp;nbsp;the time&amp;nbsp;figuring out what was going on:)&lt;/P&gt;&lt;P&gt;Paul&amp;nbsp;</description><pubDate>Thu, 05 Jul 2007 13:00:43 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9982.aspx</link><description>Hi Paul,&lt;/P&gt;&lt;P&gt;Somehow they missed this one. I just asked about it in another post and they said they would take a look at it.&lt;/P&gt;&lt;P&gt;-Larry</description><pubDate>Thu, 05 Jul 2007 12:34:31 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9971.aspx</link><description>Larry,&lt;/P&gt;&lt;P&gt;I ran into exactly the same issue ,&amp;nbsp;was there any response on this?&amp;nbsp;</description><pubDate>Thu, 05 Jul 2007 09:26:34 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Timeout Saving on a Transaction</title><link>http://forum.strataframe.net/FindPost9753.aspx</link><description>Looks like this one got overlooked. Should the framework handle parent/child objects being saved on a transaction without having to track which object is dirty or is that the developers responsibility? I'm assuming what is happening is the parent object gets saved once by the child object, but is not comitted. When&amp;nbsp;save(true) is called on the parent the second time, it's blocked since it's trying to update data that's alreadly locked by the current transaction and eventully the update request times out.&lt;/P&gt;&lt;P&gt;-Larry</description><pubDate>Fri, 22 Jun 2007 13:42:37 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item></channel></rss>