1. Technology

A Guide to Using the TClientDataSet in Delphi applications

By

Two men looking at computer
Jupiterimages/Stockbyte/Getty Images
Looking for a single-file, single-user database for your next Delphi application? Need to store some application specific data but you do not want to user the Registry / INI / or something else?

Why look outside the box? Delphi already has an answer for you: the TClientDataSet component (located on the "Data Access" tab of the component palette) represents an in-memory database-independent dataset. Whether you use client datasets for file-based data, caching updates, data from an external provider (such as working with an XML document or in a multi-tiered application), or a combination of these approaches such as a "briefcase model" application, you can take advantage of broad range of features client datasets support.

Time to learn about TClientDataSet:

A ClientDataSet in Every Database Application
The basic behavior of the ClientDataSet is described, and an argument is made for the extensive use of ClientDataSets in most all database applications.

Defining a ClientDataSet's Structure Using FieldDefs
When creating a ClientDataSet's memory store on-the-fly, you must explicitly define the structure of your table. This article shows you how to do it at both runtime and design-time using FieldDefs.

Defining a ClientDataSet's Structure Using TFields
This article demonstrates how to define a ClientDataSet's structure at both design-time and runtime using TFields. How to create virtual and nested dataset fields is also demonstrated.

Understanding ClientDataSet Indexes
A ClientDataSet does not obtain its indexes from the data it loads. Indexes, if you want them, must be explicitly defined. This article shows you how to do this at design-time or runtime.

Navigating and Editing a ClientDataSet
You navigate and edit a ClientDataSet in a manner similar to how you navigate and edit almost another other dataset. This article provides an introductory look at basic ClientDataSet navigation and editing.

Searching a ClientDataSet
ClientDataSets provide a number of different mechanisms for searching for and location data in its columns. These techniques are covered in this continuation of the discussion of basic ClientDataSet manipulation.

Filtering ClientDataSets
When applied to a dataset, a filter limits the records that are accessible. This article explores the ins and outs of filtering ClientDataSets.

ClientDataSet Aggregates and GroupState
This article describes how to use aggregates to calculate simple statistics, as well as how to use group state to improve your user interfaces.

Nesting DataSets in ClientDataSets
Like the name suggests, a nested dataset is a dataset within a dataset. By nesting one dataset inside another, you can reduce your overall storage needs, increase the efficiency of network communications, and simplify data operations.

Cloning ClientDatSet Cursors
When you clone a ClientDataSet's cursor, you create not only an additional pointer to a shared memory store, but also an independent view of the data. This article shows you how to use this important capability

Deploying Applications that use ClientDataSets
Depending on what you do within your application, if you use one or more ClientDataSets you may need to deploy one or more libraries, in addition to your application's executable. This article describes when and how

Creative Solutions Using ClientDataSets
ClientDataSets can be used for much more than displaying rows and columns from a database. See how they solve applications issues from selecting options to process, progress messages, creating audit trails for data changes and more.

  1. About.com
  2. Technology
  3. Delphi
  4. Using Data (DB) Controls
  5. A Guide to Using the TClientDataSet in Delphi Applications

©2014 About.com. All rights reserved.