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 ...
Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.