O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with DataTables

One of the most versatile components that Delphi contained is the TClientDataSet. While originally included for use in Delphi’s DataSnap technology, TClientDataSet turned out to be a useful object for manipulating in-memory tables.

Likewise, the typical usage of DataSet is to work on data from a data source that was retrieved through a DataAdapter. However, DataSet and DataTables are also in-memory structures that give you the same level of versatility offered by TClientDataSet. In fact, the DataTable most closely resembles the TClientDataSet. This section focuses on how to use the DataTable.

Defining Columns

To define columns in a DataTable, you can use either the Add() or AddRange() methods of the DataColumnCollection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required