From Wikipedia, the free encyclopedia
Content deleted Content added
| Line 11: | Line 11: | ||
|
===Schema and table mappings=== |
===Schema and table mappings=== |
||
|
Data adapters can also configure a DataSet’s schema from the data source (for example, using ”FillSchema”) and can map source table names to DataTable names through table mappings.<ref name=”MS-FillSchema”>{{cite web |title=DataAdapter.FillSchema Method (System.Data.Common) |website=Microsoft Learn |url=https://learn.microsoft.com/en-us/dotnet/api/system.data.common.dataadapter.fillschema |access-date=13 December 2025}}</ref><ref name=”MS-DbDataAdapter” /> |
Data adapters can also configure a DataSet’s schema from the data source (for example, using ”FillSchema”) and can map source table names to DataTable names through table mappings.<ref name=”MS-FillSchema”>{{cite web |title=DataAdapter.FillSchema Method (System.Data.Common) |website=Microsoft Learn |url=https://learn.microsoft.com/en-us/dotnet/api/system.data.common.dataadapter.fillschema |access-date=13 December 2025}}</ref><ref name=”MS-DbDataAdapter” /> |
||
|
==Implementations== |
|||
|
* SqlDataAdapter for Microsoft SQL Server (”System.Data.SqlClient”)<ref name=”MS-SqlDataAdapter”>{{cite web |title=SqlDataAdapter Class (System.Data.SqlClient) |website=Microsoft Learn |url=https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqldataadapter?view=netframework-4.8.1 |access-date=13 December 2025}}</ref> |
|||
|
==References== |
==References== |
||
Revision as of 17:02, 14 December 2025
ADO.NET component that bridges a data source and a DataSet
In ADO.NET, a data adapter (DataAdapter) is an object that acts as a bridge between a data source and a disconnected in-memory data representation such as a DataSet, enabling data to be retrieved into the DataSet and later written back to the data source.[1][2]
Overview
The DataAdapter is an abstract base class in the System.Data.Common namespace; provider-specific implementations (such as for SQL Server, OLE DB, or ODBC) typically derive from DbDataAdapter.[1][3] Data adapters are used with the ADO.NET disconnected model, where an application loads data into a memory-resident DataSet (including related tables, constraints, and relationships) and later reconciles changes back to the underlying data source.[4]
Updating the data source
A DataAdapter can persist changes made in the DataSet back to the data source using Update; it applies INSERT, UPDATE and DELETE operations as appropriate based on changes tracked in the DataSet, using command objects such as InsertCommand, UpdateCommand and DeleteCommand.[5]
Schema and table mappings
Data adapters can also configure a DataSet’s schema from the data source (for example, using FillSchema) and can map source table names to DataTable names through table mappings.[6][3]
Implementations
- SqlDataAdapter for Microsoft SQL Server (System.Data.SqlClient)[7]
References


