CHAPTER 22 ADO.NET PART II: THE DISCONNECTED LAYER
Table 22-1. Properties of the DataSet
Property
Meaning in Life
CaseSensitive
Indicates whether string comparisons in DataTable objects are case sensitive
(or not). The default is false (string comparisons are not case sensitive by
default).
DataSetName
Represents the friendly name of this DataSet. Typically, you establish this
value as a constructor parameter.
EnforceConstraints
Gets or sets a value indicating whether constraint rules are followed when
attempting any update operations (the default is true).
HasErrors
Gets a value indicating whether there are errors in any of the rows in any of
the DataTables of the DataSet.
RemotingFormat
Allows you to define how the DataSet should serialize its content (binary or
XML, which is the default).
Key Methods of the DataSet
The methods of the DataSet work in conjunction with some of the functionality provided by the
aforementioned properties. In addition to interacting with XML streams, the DataSet provides methods
that allow you to copy the contents of your DataSet, navigate between the internal tables, and establish
the beginning and ending points of a batch of updates. Table 22-2 describes some core methods.
Table 22-2. Select Methods of the DataSet
862
Methods
Meaning in Life
AcceptChanges()
Commits all the changes made to this DataSet since it was loaded or the
last time AcceptChanges() was called.
Clear()
Completely clears the DataSet data by removing every row in each
DataTable.
Clone()
Clones the structure, but not the data, of the DataSet, including all
DataTables, as well as all relations and any constraints.
Copy()
Copies both the structure and data for this DataSet.
GetChanges()
Returns a copy of the DataSet containing all changes made to it since it
was last loaded or since AcceptChanges() was called. This method is
overloaded, so that you can get just the new rows, just the modified rows,
or just the deleted rows.