Dataset : Indicates the data cache in the memory.
Namespace: System. Data
ProgramSet: System. Data (In system. Data. dll)
Dataset Is the main component of the ADO. net structure. It is the cache of data retrieved from the data source in the memory.
Dataset By a group Datatable Object. Datarelation Objects are correlated. You can also use Uniqueconstraint And Foreignkeyconstraint Object in
Dataset To implement data integrity.
Although Datatable The object contains data, Datarelationcollection You can view the table hierarchy. These tables are included in Tables Attribute access Datatablecollection . When accessing Datatable Objects are case sensitive. For example, if Datatable It is named "mydatatable" and the other is named "mydatatable". strings used to search one of the tables are considered case sensitive. However, if "mydatatable" exists and "mydatatable" does not exist, the search string is case-insensitive.
Dataset Data and architecture can be read and written as XML documents. Data and architecture can be transmitted over HTTP and used by any application on any platform that supports XML. Available Writexmlschema Method To save the architecture as an XML architecture, and you can use Writexml Method To save the Architecture and Data.
In a typical multi-layer implementation, it is used to create and refreshDatasetThe steps for updating the original data in sequence include:
-
PassDataadapterUse data generation and filling in the data sourceDatasetInDatatable.
By adding, updating, or deletingDatarowChange a single objectDatatableObject.
-
CallGetchangesMethod to create the secondDataset.
-
CallDataadapterOfUpdateMethod, and the secondDatasetPassed as a parameter.
-
CallMergeThe method returns the secondDatasetTo merge the changes in.
-
ForDatasetCallAcceptchanges. Or, callRejectchangesTo cancel the change.
Datatable:Indicates a table of data in the memory.
DatatableIs the core object in the ADO. Net Library. Other usageDatatableIncludingDatasetAndDataview.
When accessingDatatableObjects are case sensitive. For example, ifDatatableIt is named "mydatatable" and the other is named "mydatatable". strings used to search one of the tables are considered case sensitive. However, if "mydatatable" exists and "mydatatable" does not exist, the search string is case-insensitive. OneDatasetIt can contain twoDatatableObjects with the sameTablenameAttribute values and differentNamespaceAttribute Value.
Dataview: Used for sorting, filtering, searching, editing, and navigationDatatableUser-Defined views that can bind data.
DataviewAllows data binding on Windows and web forms.
In addition, you can customize dataview to represent able . This feature allows you to bind to the same datatable , but two controls of different data versions are displayed. For example, a control may be bound to dataview of all rows in the display table, the other control may be configured to display only the rows that have been deleted from datatable . datatable also has defaultview attribute. It returns the default dataview of the table. For example, to create a custom view on a table, go to defaultview sets dataview rowfilter .
To create a data filtering and sorting view, SetRowfilterAndSortAttribute. Then, useItemAttribute returns a singleDatarowview.
Also availableAddnewAndDeleteMethod to add or delete rows from the collection of rows. When using these methods, you can setRowstatefilterAttribute to specify that only deleted rows or new rows can beDataviewDisplay.