O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required