Overview of the Architecture of ADO。NET。ADO。NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC。 Data-sharing consumer applications can use ADO。NET to connect to these data sources and retrieve, handle, and update the data that they contain。 84932

ADO。NET separates data access from data manipulation into discrete components that can be used separately or in tandem。 ADO。NET includes 。NET Framework data providers for connecting to a database, executing commands, and retrieving results。 Those results are either processed directly, placed in an ADO。NET DataSet object in order to be exposed to the user in an ad hoc manner, combined with data from multiple sources, or passed between tiers。 The DataSet object can also be used independently of a 。NET Framework data provider to manage data local to the application or sourced from XML。 

The ADO。NET classes are found in System。Data。dll, and are integrated with the XML classes found in System。Xml。dll。 For sample code that connects to a database, retrieves data from it, and then displays that data in a console window。 

ADO。NET provides functionality to developers who write managed code similar to the functionality provided to native component object model (COM) developers by ActiveX Data Objects (ADO)。 We recommend that you use ADO。NET, not ADO, for accessing data in your 。NET applications。 

Privacy Statement: The System。Data。dll, System。Data。Design。dll, System。Data。OracleClient。dll, System。Data。SqlXml。dll, System。Data。Linq。dll, System。Data。SqlServerCe。dll, and System。Data。DataSetExtensions。dll assemblies do not distinguish between a user's private data and non-private data。 These assemblies do not collect, store, or transport any user's private data。 However, third-party applications might collect, store, or transport a user's private data using these assemblies。

1、ADO。NET Architecture

Data processing has traditionally relied primarily on a connection-based, two-tier model。 As data processing increasingly uses multi-tier architectures, programmers are switching to a disconnected approach to provide better scalability for their applications。 

 ADO。NET Components 

The two main components of ADO。NET 3。0 for accessing and manipulating data are the 。NET Framework data providers and the DataSet。 

。NET Framework Data Providers

The 。NET Framework Data Providers are components that have been explicitly designed for data manipulation and fast, forward-only, read-only access to data。 The Connection object provides connectivity to a data source。 The Command object enables access to database commands to return data, modify data, run stored procedures, and send or retrieve parameter information。 The DataReader provides a high-performance stream of data from the data source。 Finally, the DataAdapter provides the bridge between the DataSet object and the data source。 The DataAdapter uses Command objects to execute SQL commands at the data source to both load the DataSet with data and reconcile changes that were made to the data in the DataSet back to the data source。 

The DataSet

The ADO。NET DataSet is explicitly designed for data access independent of any data source。 As a result, it can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application。 The DataSet contains a collection of one or more DataTable objects consisting of rows and columns of data, and also primary key, foreign key, constraint, and relation information about the data in the DataTable objects。 The following diagram illustrates the relationship between a 。NET Framework data provider and a DataSet。 

ADO。NET architecture

Choosing a DataReader or a DataSet

上一篇:齿轮平行转子系统英文文献和中文翻译
下一篇:电子商务英文文献及中文翻译

未加筋的低屈服点钢板剪...

会计师事务所任期与审计...

信息系统开发与数据库开...

升式单位上升操作结构英文文献和中文翻译

机器人学入门力学与控制英文文献和中文翻译

园林植物景观的园林绿化...

基卡气体管道PLEM结构的原...

LiMn1-xFexPO4正极材料合成及充放电性能研究

新課改下小學语文洧效阅...

互联网教育”变革路径研究进展【7972字】

我国风险投资的发展现状问题及对策分析

ASP.net+sqlserver企业设备管理系统设计与开发

麦秸秆还田和沼液灌溉对...

安康汉江网讯

张洁小说《无字》中的女性意识

老年2型糖尿病患者运动疗...

网络语言“XX体”研究