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  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    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

    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...
    - The Implementation of an FTP Server
    - FTP Server: The Theory







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway