﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <description><![CDATA[Comments for Navigating and Editing a ClientDataSet]]></description>
    <title><![CDATA[Comments for Navigating and Editing a ClientDataSet]]></title>
    <link>http://edn.embarcadero.com/article/29122</link>
    <!-- source: http://edn.embarcadero.com/article/29122/feed-->
    <dc:date>2009-07-09T15:30:20-07:00</dc:date>
    <item>
      <description><![CDATA[The article is very interesting and helpful, as all the others in the series.I think an example of deleting the "master" record in a "master-detail" ( something as record n from m records, where m &gt; n &gt; 1 ) arrangement will be even more helpful. ]]></description>
      <title><![CDATA[Deleting in a nested DataSet]]></title>
      <managingEditor>
	 (Dan Maxim)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=34566</guid>
      <dc:date>2003-05-03T21:43:48-07:00</dc:date>
      <pubDate>2003-05-03T21:43:48-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA[Hi,After reading your excellent "Client Data Set" articles, I started to try to use TClientDataSets on D7 Pro on Win2K.Firstly, I tried converting some of my old projects using BDE components (BDE 5.01).But, recently I found an interesting problem, which I couldn't solve yet.I have an MSACCESS table with a TMemo field. There are hundreds of records in the table, and most of the Memo fields contain a large amount of data. Before using a TClientDataSet, I had no problems with that table.I import the table contents to a TClientDataSet, with a TDataSetProvider and a TQuery. I display the contents on a form using a TDBGrid, and a TDBMemo.If I make any changes in the TDBMemo field which contains a data which is larger than 256 bytes, ClientDataSet1.ApplyUpdates(-1) function doesn't work. It only updates the database if the memo field contains data which is shorter than 256 bytes.After adding the "Reconcile Error Dialog" Module on my project, I obtained the actual problem as: External Exception EEFFACE.How can I solve this problem? Is it impossible to use Memo fields larger than 256 bytes with TClientDataSet component and MSACCESS tables?Thanks in Advance.Ahmet Aksoy ]]></description>
      <title><![CDATA[External Exception EEFFACE with TClientDataSet Memo Field]]></title>
      <managingEditor>
	 (AHMET AKSOY)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=34273</guid>
      <dc:date>2003-03-14T06:33:49-07:00</dc:date>
      <pubDate>2003-03-14T06:33:49-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA[But most of the times, at least in real world programming, you want this code to update all or nothing.]]></description>
      <title><![CDATA[It depends on the implicit contract]]></title>
      <managingEditor>
	 (Ian Marteens)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=33238</guid>
      <dc:date>2002-09-30T17:41:50-07:00</dc:date>
      <pubDate>2002-09-30T17:41:50-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA["The problem has to do with a try/except inside a while loop: it's very inefficient! You could achieve a similar result by moving out the try/except from the loop, like this:"Not exactly.  In your example, if an exception is raised, the loop will exit, and any remaining records will not be processed.  In Mr. Jensen's code, if a record cannot be edited (for ANY reason), it will be skipped, but remaining records will still be processed.  Moving the CDS1.Cancel outside the loop changes the operation of the routine.]]></description>
      <title><![CDATA[re: ... and then, there's another problem...]]></title>
      <managingEditor>
	 (Mark Shapiro)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=33231</guid>
      <dc:date>2002-09-30T05:32:20-07:00</dc:date>
      <pubDate>2002-09-30T05:32:20-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA[When you have called BeginUpdate on a TDataSet (of any sort - not just a TClientDataSet), the BeforeScroll and AfterScroll events DO still fire for EACH record that is scrolled through.  In some cases, this is the desired behavior.  In other cases, though, I have found that I do not want these events to fire when controls are disabled.  The are two quick ways to accomplish this:  1) Set the BeforeScroll and AfterScroll events to nil when calling BeginUpdate, and reassign them when calling EndUpdate.  2) In the *Scroll event, check DataSet.ControlsDisabled - if it is true, exit or otherwise skip the code.There is a drawback to doing this, however.  When you call EnableControls, the scroll events will NOT fire.  If you have code in the scroll events that needs to be executed, you will need to manually call the event handler.]]></description>
      <title><![CDATA[A note on BeginUpdate/EndUpdate]]></title>
      <managingEditor>
	 (Mark Shapiro)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=33230</guid>
      <dc:date>2002-09-30T05:27:39-07:00</dc:date>
      <pubDate>2002-09-30T05:27:39-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA[... in that method gain. The inner try/except is supossed to bring back the dataset to dsBrowse state from the dsEdit state (and it's missing a raise in the except clause). The problem has to do with a try/except inside a while loop: it's very inefficient! You could achieve a similar result by moving out the try/except from the loop, like this:   CDS1.First;   try     while not CDS1.Eof do     begin       CDS1.Edit;       // whatever...       CDS1.Post;       CDS1.Next;     end;   except     CDS1.Cancel;     raise;   end;Cancel doesn't fail if the dataset it's not in one of the edit modes (dsEdit, dsInsert). You can check the VCL source code for this.]]></description>
      <title><![CDATA[... and then, there's another problem...]]></title>
      <managingEditor>
	 (Ian Marteens)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=33226</guid>
      <dc:date>2002-09-29T11:01:19-07:00</dc:date>
      <pubDate>2002-09-29T11:01:19-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <item>
      <description><![CDATA[Let's see that code...      try        ClientDataSet1.Edit;        try          ClientDataSet1.Fields[0].Value :=            UpperCase(ClientDataSet1.Fields[0].Value);          ClientDataSet1.Post;        except          //record cannot be posted. Cancel;          ClientDataSet1.Cancel;        end;      except        //Record cannot be edit. Skip      end;Never write such exception handlers. This will lead to difficult detectable errors. Exception handling it is mechanism for program flow control, not mechanism for hiding errors.If you know how to handle specific exception and sure that you can safely recover from it then handle it and continue your work. If no then abort operation. Imagine if BeforePost handler raises EAccessViolation in such operation... when and where you see that exception? Certainly not in place where it happens. Then you get AV somewhere else (probably on the code that clear as virgin's tear) and spend much more time to determine what happens.It's questions of good programming style.]]></description>
      <title><![CDATA[try..except incorrectly used]]></title>
      <managingEditor>
	 (Andrew Fionik)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=33219</guid>
      <dc:date>2002-09-28T02:16:27-07:00</dc:date>
      <pubDate>2002-09-28T02:16:27-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/29122/feed">Comments for Navigating and Editing a ClientDataSet</source>
    </item>
    <generator>Atom 1.0 XSLT Transform v1 (http://atom.geekhood.net)</generator>
  </channel>
</rss>