Home arrow Delphi-Kylix arrow Page 2 - Client Dataset: Working with Data Packets and Applying Updates

Client Dataset: Working with Data Packets and Applying Updates

This article is the fifth part of my series on the Client Dataset available in Delphi. It will focus on how to work with data packets by using the features of client dataset/dataset provider components.

Author Info:
By: Danish Ahmed
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
January 09, 2008
  1. · Client Dataset: Working with Data Packets and Applying Updates
  2. · Reconciling Errors
  3. · Information in Data Packets
  4. · Specific Fields and Custom Information

print this article

Client Dataset: Working with Data Packets and Applying Updates - Reconciling Errors
(Page 2 of 4 )


Reconciling Errors

When the HandleReconcileError method is called it brings up the Reconcile Error Dialog, displaying information on the record that could not be updated. It displays all three values of the record: the value held by the field before it was modified, the modified value, and the current value of the record on the server. The dialog also displays information pertaining to the update type, and the reason why the update failed is described in the error message panel. It also allows the user to edit the values of the record to be updated and choose the reconcile action type.


procedure TForm1.CDS1ReconcileError(

DataSet: TCustomClientDataSet; E: EReconcileError; UpdateKind: TUpdateKind;

var Action: TReconcileAction);


Action:=HandleReconcileError(Dataset, UpdateKind, E);



Dataset: A dataset containing modified records that could not be saved to the database server. You can get information and edit records using its methods and properties to correct the problem that makes posting to the database difficult.

E: The exception object representing the error; use this object to extract the error message or determine the cause of the error.

UpdateKind: The type of update that generated the error.

An UpdateKind can be:

ukInsert - Implying that the error occurred during an Insert statement or while inserting a new record.

ukDelete - Implying that the error occurred while deleting an existing record.

ukModify - Implying that the problem occurred while updating an existing record that was modified.

Action: This parameter allows you to specify what action is to be taken when the handler exits.

  • To skip the record, leaving it in the change log, specify the Action as rrSkip or raSkip

  • To abort the reconciliation operation, specify rrAbort or raAbort

  • If a record from the server has not been modified, it can be merged with the corresponding record on the server by specifying the Action as rrMerge or raMerge

  • The Reconcile Error dialog allows the user to provide a new value for the current record in the change log. Specify the Action as rrApply or raCorrect to replace the current value of the dataset with the user-specified value.

  • If you want to discard the changes you made to the change log in this OnReconcileError handler, pass Action as rrCancel

  • To update the current value of the record with the value in the server, use raRefresh as the value of the  Action parameter. This option can be used only in the OnReconcileError event handler.

rrIgnore - Use if the event generated is OnUpdateError.  It is intended for the case where the event handler applies the update back to the database server. The updated record is removed from the change log and merged into Data, as if the provider had applied the update. [Delphi help file]   

blog comments powered by Disqus

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials