<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Increasing timeout for saves</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Increasing timeout for saves</description>
  <pubDate>Sat, 25 Apr 2026 11:14:03 -700</pubDate>
  <lastBuildDate>Fri, 09 Mar 2012 11:21:10 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3327</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Increasing timeout for saves :   Hi Chris,The TransactionSettings...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3327&amp;PID=12946#12946</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3327<br /><strong>Posted:</strong> 09-Mar-2012 at 11:21am<br /><br />Hi Chris,<div>&nbsp;</div><div>The TransactionSettings timeout is only used when DTC is on, and would set the timeout on the TransactionScope, but as you found doesn't help here.</div><div>&nbsp;</div><div>For a save, DevForce sets up an InsertCommand, UpdateCommand and/or DeleteCommand for every entity to be saved and then calls&nbsp;DataAdapter.Update on the EntityTable.&nbsp; So although it's weird to see a "query timeout" for a save (we've never seen one before) it would be the CommandTimeout property on each command which controls this.&nbsp; Since a command affects only a single row, it does seem strange that the 30 second default isn't sufficient, and again we've never seen this before.&nbsp; Are you triggering any additional logic as part of specific inserts/updates?</div><div>&nbsp;</div><div>Anyway, unlike the query CommandTimeout, there's not an easy way to override the CommandTimeout for the save commands.&nbsp; You'll need to implement a custom IAdapterProvider and in that set the command timeouts.&nbsp; It would look something like this:</div><div>&nbsp;</div><div>(Be sure to specify the entity types this is needed for.)&nbsp; </div><div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">class</span>&nbsp;<span style="color: rgb43, 145, 175;">MyRdbAdapterProvider</span>&nbsp;:&nbsp;<span style="color: rgb43, 145, 175;">IAdapterProvider</span>&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">private</span>&nbsp;<span style="color: rgb43, 145, 175;">RdbAdapterProvider</span>&nbsp;_provider; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">Type</span>&#091;&#093;&nbsp;SupportedEntityTypes&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;<span style="color: blue;">new</span>&#091;&#093;&nbsp;{<span style="color: blue;">typeof</span>(<span style="color: rgb43, 145, 175;">Customer</span>)};&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">void</span>&nbsp;Initialize(<span style="color: rgb43, 145, 175;">Type</span>&nbsp;pEntityType,&nbsp;<span style="color: rgb43, 145, 175;">IDataSourceKey</span>&nbsp;pDataSourceKey)&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_provider&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">RdbAdapterProvider</span>();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_provider.Initialize(pEntityType,&nbsp;pDataSourceKey); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green;">//&nbsp;Set&nbsp;the&nbsp;timeout&nbsp;values&nbsp;on&nbsp;the&nbsp;commands&nbsp;now:&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">var</span>&nbsp;da&nbsp;=&nbsp;_provider.DataAdapter&nbsp;<span style="color: blue;">as</span>&nbsp;System.Data.OleDb.<span style="color: rgb43, 145, 175;">OleDbDataAdapter</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;da.InsertCommand.CommandTimeout&nbsp;=&nbsp;60;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;da.UpdateCommand.CommandTimeout&nbsp;=&nbsp;60;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">Type</span>&nbsp;EntityType&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;_provider.EntityType;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">IDataAdapter</span>&nbsp;DataAdapter&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;_provider.DataAdapter;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DataTable</span>&nbsp;TemplateDataTable&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;_provider.TemplateDataTable;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">void</span>&nbsp;Refetch(<span style="color: rgb43, 145, 175;">IDataAdapter</span>&nbsp;pAdapter,&nbsp;<span style="color: rgb43, 145, 175;">DataTable</span>&nbsp;pSourceTable,&nbsp;<span style="color: rgb43, 145, 175;">DataTable</span>&nbsp;pDestTable)&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_provider.Refetch(pAdapter,&nbsp;pSourceTable,&nbsp;pDestTable);&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;}</pre></div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 09 Mar 2012 11:21:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3327&amp;PID=12946#12946</guid>
  </item> 
  <item>
   <title>Increasing timeout for saves : Hello,Our application uses DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3327&amp;PID=12945#12945</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=810" rel="nofollow">chrishibler</a><br /><strong>Subject:</strong> 3327<br /><strong>Posted:</strong> 09-Mar-2012 at 6:46am<br /><br />Hello,<div><br></div><div>Our application uses DevForce classic and SQL Server. I'm having trouble adjusting the timeout options so that a save does not timeout after 30 seconds.</div><div><br></div><div>So my goal is to be able to adjust the timeout value during an insert or update operation.</div><div><br></div><div>I'm attempting to use transaction settings like this in the SaveOptions and I've tried with UseDTCOption.True and UseDTCOption.False.</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IdeaBlade.Persistence.TransactionSettings settings =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new IdeaBlade.Persistence.TransactionSettings(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UseDTCOption.True,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Transactions.IsolationLevel.ReadUncommitted,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeSpanOverride);</div></div><div><br></div><div><br></div><div>I think the timeout is definitely coming from the database connection because I can easily reproduce it by locking the table for a predetermined time.&nbsp;</div><div><br></div><div><br></div><div>The debug log has this error which further confirms this:</div><div><br></div><div>Exception occurred: System.Data.OleDb.OleDbException: Query timeout expired at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo&#091;&#093; batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo&#091;&#093; batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow&#091;&#093; dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at IdeaBlade.Persistence.Server.TransactionManagerHelper.SaveTable(EntityTable pTable, Boolean pDeleting, PostSaveHandler pPostSaveHandler, Boolean pExcludeFromRefetch) at IdeaBlade.Persistence.Server.TransactionManagerHelper.Save(DataSet pDataSet, SaveOptions pSaveOptions)</div><div><br></div><div><br></div><div>Any help you can provide would be much appreciated.</div><div><br></div><div>Thanks!</div><div><br></div><div>Chris Hibler</div><div><br></div><div>chrishibler@decadesoftware.com</div>]]>
   </description>
   <pubDate>Fri, 09 Mar 2012 06:46:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3327&amp;PID=12945#12945</guid>
  </item> 
 </channel>
</rss>