JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the DataSet Class

The DataSet class supports datasets, which act as data caches you can access in code. Here is the inheritance hierarchy of this class:

Object
   MarshalByValueComponent
      DataSet

You can find the more notable public properties of DataSet objects in Table 22.21, their more notable methods in Table 22.22, and their more notable events in Table 22.23.

Table 22.21: Noteworthy public properties of DataSet objects.

Property

Means

CaseSensitive

Gets/sets whether string comparisons are case-sensitive.

DataSetName

Gets/sets the name of the dataset.

EnforceConstraints

Gets/sets if constraint rules are enforced.

HasErrors

Indicates if there are errors in any row of any table.

Locale

Gets/sets the locale data to compare strings.

Namespace

Gets/sets the namespace of the dataset.

Relations

Get relation objects that link tables.

Tables

Gets tables in the dataset.

Table 22.22: Noteworthy public methods of DataSet objects.

Method

Means

AcceptChanges

Accepts (commits) the changes made to the dataset.

BeginInit

Begins the initialization of a dataset.

Clear

Clears the dataset by removing all rows in all tables.

Copy

Copies the dataset.

EndInit

Ends the initialization of a dataset.

GetChanges

Gets a dataset containing all changes made to the current dataset.

GetXml

Returns the data in the dataset in XML.

GetXmlSchema

Returns the schema for the dataset.

HasChanges

Indicates if the dataset has changes that have not yet been accepted.

Merge

Merges this dataset with another dataset.

ReadXml

Reads data into a dataset from XML.

ReadXmlSchema

Reads an XML schema into a dataset.

RejectChanges

Rolls back the changes made to the dataset since it was created or since the AcceptChanges method was called.

Reset

Resets the dataset back to the original state.

WriteXml

Writes the dataset's schema and data to XML.

WriteXmlSchema

Writes the dataset's schema to XML.

Table 22.23: Noteworthy public events of DataSet objects.

Event

Means

MergeFailed

Occurs when a Merge operation fails.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor