Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Client Dataset: Working with Data Packets ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Client Dataset: Working with Data Packets and Applying Updates
By: Danish Ahmed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-01-09

    Table of Contents:
  • Client Dataset: Working with Data Packets and Applying Updates
  • Reconciling Errors
  • Information in Data Packets
  • Specific Fields and Custom Information

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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);

    begin

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

    end;

      

    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]   

    More Delphi-Kylix Articles
    More By Danish Ahmed


     

    DELPHI-KYLIX ARTICLES

    - 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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT