Delphi-Kylix
  Home arrow Delphi-Kylix arrow Demystifying the Client Dataset
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

Demystifying the Client Dataset
By: Danish Ahmed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2007-12-12

    Table of Contents:
  • Demystifying the Client Dataset
  • Introducing the Client Dataset
  • Using Filters and Ranges with the Client Dataset
  • Cache Updates

  • 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


    Demystifying the Client Dataset


    (Page 1 of 4 )

    The TClient Dataset component available in Delphi encapsulates a lot more features than one would expect from a dataset component. TClient DataSet is a specialized component that holds data in-memory and can be used effectively in different application architectures. It does not require a database connection to work and for that reason it is suited to file-based application architecture.

    The client dataset can be used in single-tiered or two-tiered application and multi-tiered applications as effectively to cache updates and resolve them in one transaction. The client dataset offers robustness, speed and flexibility, and has features to make the best use of whichever architecture it is a part. Since it is self-contained and does not require persistent server connection applications created, using it is not dependent on data access mechanisms like BDE or ADO. For the same reason applications using the client dataset are easier to port to other platforms without requiring a complete rework.

    The list of features and methodologies offered by the TClientDataset component is exhaustive so there is always a probability that you might not have discovered all of its functions. In this series of articles I will attempt to demonstrate how the client dataset can be included and taken advantage of in all three architectures I mentioned above -- file based, single-tiered or two-tiered and n-tiered architectures.

    Most datasets you are likely to work with commit transactions with the data source the moment you make a change. As you insert records, delete or edit them, the information is sent to the database server which modifies/inserts/deletes records to reflect the changes you made. If you are connecting to a remote database server, continuous transactions can increase your network traffic to such an extent that it may actually degrade the performance.

    To avoid this you can use the Client Dataset to fetch records, store and edit them locally and commit them to the database in a single transaction. This approach helps reduce network traffic and enhances the performance of your application. Before proceeding further let us take a closer look at the TClientDataSet component.  

    The Client Dataset component was introduced in Delphi 3 as a specialized dataset to work with MIDAS (now called DataSnap) applications. However, its features are not limited to MIDAS applications; it can be substituted for most datasets when  greater flexibility and control over the database transaction is needed. The last two versions of Delphi I have worked on, Delphi 7 (cs edition) and Delphi 2006 (BDS 2006), contain the Client Dataset component in the tools pallet, but I have read that some versions don't. Assuming that your version of Delphi includes the client dataset component, let us find out more about this component.

    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 6 Hosted by Hostway
    Stay green...Green IT