Delphi-Kylix
  Home arrow Delphi-Kylix arrow Demystifying the Client Dataset
eWeek
Iron Speed
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  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
eWeek
 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 / 4
    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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    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

    - 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 2 hosted by Hostway