Strongly-Typed DataSets

Up to this point, all examples using a DataSet class have used the untyped DataSet. This section discusses the strongly-typed DataSet. A strongly-typed DataSet is a DataSet class that descends from DataSet. It contains descendant DataTables and DataRows for the tables it contains. It extends the DataSet by providing properties, events, and methods that are named and strongly typed according to the tables it holds.

Strongly-typed DataSets are normally generated by the IDE or by using the xsd command-line tool included within the .NET SDK.

Advantages/Disadvantages

There are several advantages for using strongly-typed DataSets over untyped DataSets. They are

  • Writing code is easier to understand because strong names make sense, ...

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.