Filling Data Sets with Data

The DataSet is the container within which you place the data you need to work with. You can build a DataSet from scratch by programmatically adding tables and rows, and then populating these with data. You can also fill a DataSet using the data elements found in an XML message, a method I discuss further in the "XML in ADO.NET" section. The final method of filling a DataSet involves using a DataAdapter object to connect it to a data store. Remember that a DataSet can contain multiple tables, and those tables can have relationships with each other. In the Immediate Solutions section, you will find examples of all three methods of filling a DataSet.

0 0

Post a comment