Generating a Typed DataSet

As mentioned earlier, you must first generate some valid XML for the DataSet you intend to create. Well, you must have a clue of what you need in this DataSet before you can start this process. Your coding needs dictate this. If you need only a portion of the Customers data, it is a pretty small DataSet definition. Figure 20.1 illustrates the Customers table in the Northwind database. We will use all or portions of the Customer data in our coding example. Listing 20.1 is the associated XML Schema Definition for Customers (compliant with the XML Schema definition language standards).

Figure 20.1. The Customers table.

Get Sams Teach Yourself ADO.NET in 24 Hours 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.