﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>CapableObjects forum » ECO » General discussions  » Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><generator>InstantForum.NET 2012-1</generator><description>CapableObjects forum</description><link>http://www.capableobjects.com/apps/InstantForum414/</link><webMaster>CapableObjects forum</webMaster><lastBuildDate>Fri, 18 May 2012 04:22:44 GMT</lastBuildDate><ttl>20</ttl><item><title>Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><link>http://www.capableobjects.com/apps/InstantForum414/FindPost5328.aspx</link><description>Hi all,&lt;br&gt;&lt;br&gt;I'm writing a small ASP.NET application. As I understand the EcoSpaceManager throws an exception during page unload if there are dirty objects.&lt;br&gt;&lt;br&gt;One option to avoid this exception is to call EcoSpace.UpdateDatabase() after each change to ECO objects. But it will result in too many calls to UpdateDatabase().&lt;br&gt;&lt;br&gt;What's the preferred practice to minimize the number of calls to UpdateDatabase() ?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;--&lt;br&gt;Oleg Zhukov</description><pubDate>Sat, 26 Jun 2010 16:40:51 GMT</pubDate><dc:creator>OZh</dc:creator></item><item><title>RE: Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><link>http://www.capableobjects.com/apps/InstantForum414/FindPost5334.aspx</link><description>[quote][b]OZh (2010-06-26)[/b][hr]Why not updating DB automatically before unloading the page?&lt;br&gt;&lt;br&gt;I mean why I should remember to call UpdateDatabase() myself if it can be hooked to some page lifecycle event?[/quote]&lt;br&gt;&lt;br&gt;So when the user clicks "Cancel" you want the page unload event to update the DB? :)&lt;br&gt;&lt;br&gt;Save at the point the user has completed a single logical operation.</description><pubDate>Sat, 26 Jun 2010 16:40:51 GMT</pubDate><dc:creator>Peter Morris</dc:creator></item><item><title>RE: Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><link>http://www.capableobjects.com/apps/InstantForum414/FindPost5333.aspx</link><description>Maybe the user has changed their mind and he DOESN'T want to save the changes just because he is leaving the page?</description><pubDate>Sat, 26 Jun 2010 15:51:43 GMT</pubDate><dc:creator>mtiede</dc:creator></item><item><title>RE: Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><link>http://www.capableobjects.com/apps/InstantForum414/FindPost5332.aspx</link><description>Why not updating DB automatically before unloading the page?&lt;br&gt;&lt;br&gt;I mean why I should remember to call UpdateDatabase() myself if it can be hooked to some page lifecycle event?</description><pubDate>Sat, 26 Jun 2010 13:26:40 GMT</pubDate><dc:creator>OZh</dc:creator></item><item><title>RE: Too frequent calls to UpdateDatabase() in ECO ASP.NET app</title><link>http://www.capableobjects.com/apps/InstantForum414/FindPost5329.aspx</link><description>[quote][b]OZh (2010-06-24)[/b][hr]Hi all,&lt;br&gt;&lt;br&gt;I'm writing a small ASP.NET application. As I understand the EcoSpaceManager throws an exception during page unload if there are dirty objects.&lt;br&gt;&lt;br&gt;One option to avoid this exception is to call EcoSpace.UpdateDatabase() after each change to ECO objects. But it will result in too many calls to UpdateDatabase().&lt;br&gt;&lt;br&gt;What's the preferred practice to minimize the number of calls to UpdateDatabase() ?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;--&lt;br&gt;Oleg Zhukov[/quote]&lt;br&gt;&lt;br&gt;Only update the DB after you change something.  Also, updating the DB when there are no dirty objects will do nothing.</description><pubDate>Thu, 24 Jun 2010 10:20:45 GMT</pubDate><dc:creator>Peter Morris</dc:creator></item></channel></rss>
