SqlDataAdapter and the DataSet Class

The DataSet class is a memory-resident, lightweight relational database class. It has properties that reflect the tables (Tables) and relationships between tables (Relations) within the dataset. You can control whether corresponding constraints are enforced with the EnforceConstraints property. You can name the dataset with the DataSetName property. You can also set the name of the dataset in the DataSet constructor.

The SqlDataAdapter class is used to get data from the database into the DataSet. The constructor of the HotelBroker class shows how to use a data adapter class to populate a dataset. The code is found in the Hotel subdirectory of the CaseStudy directory for this chapter.

 conn = New SqlConnection(connString) ...

Get Application Development Using Visual Basic® and .NET 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.