ADO.net简介
System.Data 命名空间<?xml:namespace prefix = o />
System.Data 命名空间提供对表示 ADO.NET 结构的类的访问。通过 ADO.NET 可以生成一些组件,用于有效管理多个数据源的数据。
在断开连接的情形中(如 Internet),ADO.NET 提供在多层系统中请求、更新和协调数据的工具。ADO.NET 结构也在客户端应用程序(如 ASP.NET 创建的 Windows 窗体或 HTML 页)中实现。
ADO.NET层次图:
<?xml:namespace prefix = v /><shapetype id="_x0000_t75" coordsize="21600,21600" o:preferrelative="t" o:spt="75" filled="f" stroked="f" path=" [email protected]@5 [email protected]@[email protected]@[email protected]@5 xe"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0 "></f><f eqn="sum @0 1 0 "></f><f eqn="sum 0 0 @1 "></f><f eqn="prod @2 1 2 "></f><f eqn="prod @3 21600 pixelWidth "></f><f eqn="prod @3 21600 pixelHeight "></f><f eqn="sum @0 0 1 "></f><f eqn="prod @6 1 2 "></f><f eqn="prod @7 21600 pixelWidth "></f><f eqn="sum @8 21600 0 "></f><f eqn="prod @7 21600 pixelHeight "></f><f eqn="sum @10 21600 0 "></f></formulas><path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype><shape id="_x0000_i1131" style="WIDTH: 557.25pt; HEIGHT: 234pt" coordsize="21600,21600" type="#_x0000_t75"><imagedata o:title="c1" src="System.files/image011.jpg"></imagedata></shape>
ADO.NET 结构的中心构件是 DataSet 类。每个 DataSet 都可以包含多个 DataTable 对象,每个 DataTable 都包含来自单个数据源(如 SQL Server)的数据。
每个 DataTable 都包含一个 DataColumnCollection(DataColumn 对象的集合),DataColumnCollection 决定每个 DataTable 的架构。DataType 属性确定 DataColumn 所包含的数据的类型。使用 ReadOnly 和 AllowDBNull 属性可以进一步确保数据完整性。使用 Expression 属性可以构造计算出的列。
如果 DataTable 参与同另一个 DataTable 的父/子关系,则通过将 DataRelation 添加到 DataSet 对象的 DataRelationCollection 来构造该关系。在添加这样的关系时,将自动创建 UniqueConstraint 和 ForeignKeyConstraint,具体取决于构造函数的参数设置。UniqueConstraint 确保列中包含的值是唯一的。ForeignKeyConstraint 确定当主键值被更改或删除时将对子行或子列执行的操作。
使用 System.Data.SqlClient 命名空间(用于 SQL Server 的 .NET Framework 数据提供程序)、System.Data.Odbc 命名空间(用于 ODBC 的 .NET Framework 数据提供程序)、System.Data.OleDb 命名空间(用于 OLE DB 的 .NET Framework 数据提供程序)或 System.Data.OracleClient 命名空间(用于 Oracle 的 .NET Framework 数据提供程序),可访问要与 DataSet 结合使用的数据源。每个 .NET Framework 数据提供程序都有相应的 DataAdapter,可以将它用作数据源和 DataSet 之间的桥梁。
<shape id="ctl00_rs1_mainContentContainer_cpe231559_i" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" o:spid="_x0000_i1025" alt=""><imagedata src="System.files/image002.gif" o:href="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif"></imagedata></shape>类
|
类
|
说明
|
<shape id="_x0000_i1026" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示可在一个或多个 DataColumn 对象上强制的约束。 |
|
<shape id="_x0000_i1027" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataTable 的约束的集合。 |
|
<shape id="_x0000_i1028" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试执行违反约束的操作时引发的异常。 |
|
<shape id="_x0000_i1029" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataTable 中列的架构。 |
|
<shape id="_x0000_i1030" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 ColumnChanging 事件提供数据。 |
|
<shape id="_x0000_i1031" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataTable 的 DataColumn 对象的集合。 |
|
<shape id="_x0000_i1032" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示使用 ADO.NET 组件发生错误时引发的异常。 |
|
<shape id="_x0000_i1033" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示两个 DataTable 对象之间的父/子关系。 |
|
<shape id="_x0000_i1034" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示此 DataSet 的 DataRelation 对象的集合。 |
|
<shape id="_x0000_i1035" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataTable 中的一行数据。 |
|
<shape id="_x0000_i1036" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
DataRowBuilder 类型支持 .NET Framework 基础结构,并且不应直接从代码中使用。 |
|
<shape id="_x0000_i1037" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 RowChanged、RowChanging、OnRowDeleting 和 OnRowDeleted 事件提供数据。 |
|
<shape id="_x0000_i1038" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataTable 的行的集合。 |
|
<shape id="_x0000_i1039" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataRow 的自定义视图。 |
|
<shape id="_x0000_i1040" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示数据在内存中的缓存。 |
|
<shape id="_x0000_i1041" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
该成员支持 .NET Framework 结构,不应从代码直接使用。 |
|
<shape id="_x0000_i1042" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
用说明来标记属性、事件或扩展程序。可视化设计器在引用成员时可显示该说明。 |
|
<shape id="_x0000_i1043" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示内存中数据的一个表。 |
|
<shape id="_x0000_i1044" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 Clear 方法提供数据。 |
|
<shape id="_x0000_i1045" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示 DataSet 的表的集合。 |
|
<shape id="_x0000_i1046" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 NewRow 方法提供数据。 |
|
<shape id="_x0000_i1047" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
DataTableReader 以一个或多个只读、只进结果集的形式获取一个或多个 DataTable 对象的内容。 |
|
<shape id="_x0000_i1048" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示用于排序、筛选、搜索、编辑和导航的 DataTable 的可绑定数据的自定义视图。 |
|
<shape id="_x0000_i1049" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
包含 DataSet 中每个 DataTable 的默认 DataViewSettingCollection。 |
|
<shape id="_x0000_i1050" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示从 DataViewManager 创建的 DataView 的 ApplyDefaultSort、DataViewManager、RowFilter、RowStateFilter、Sort 和 Table 的默认设置。 |
|
<shape id="_x0000_i1051" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
包含 DataSet 中每个 DataTable 的 DataViewSetting 对象的只读集合。 |
|
<shape id="_x0000_i1052" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
在插入、更新或删除操作过程中当受影响的行数等于零时由 DataAdapter 引发的异常。 |
|
<shape id="_x0000_i1053" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示尝试在已删除的 DataRow 上执行操作时引发的异常。 |
|
<shape id="_x0000_i1054" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在 DataSet — 相关对象添加操作的过程中,遇到重复的数据库对象名称时引发的异常。 |
|
<shape id="_x0000_i1055" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示无法计算 DataColumn 的 Expression 属性时引发的异常。 |
|
<shape id="_x0000_i1056" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 DbDataAdapter 的 FillError 事件提供数据。 |
|
<shape id="_x0000_i1057" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示删除或更新某个值或行时,对主键/外键关系中一组列强制进行的操作限制。 |
|
<shape id="_x0000_i1058" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在 RowChanging 事件中调用 EndEdit 方法时引发的异常。 |
|
<shape id="_x0000_i1059" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
提供用于创建集合的基本功能。 |
|
<shape id="_x0000_i1060" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在不正确地尝试创建或访问关系时引发的异常。 |
|
<shape id="_x0000_i1061" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试将包含无效 Expression 的 DataColumn 添加到 DataColumnCollection 中时引发的异常。 |
|
<shape id="_x0000_i1062" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
在目标和源 DataRow 具有相同的主键值,且将 EnforceConstraints 属性设置为“真”时发生。 |
|
<shape id="_x0000_i1063" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试访问没有主键的表中的行时引发的异常。 |
|
<shape id="_x0000_i1064" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试将空值插入 AllowDBNull 设置为 false 的列中时引发的异常。 |
|
<shape id="_x0000_i1065" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
当用户中止正在执行的某操作时,将引发此异常。 |
|
<shape id="_x0000_i1066" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示可以添加到 DataColumn、DataSet 或 DataTable 的属性的集合。 |
|
<shape id="_x0000_i1067" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试更改只读列的值时引发的异常。 |
|
<shape id="_x0000_i1068" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示尝试在不位于 DataTable 中的 DataRow 上执行操作时引发的异常。 |
|
<shape id="_x0000_i1069" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 .NET Framework 数据提供程序的状态更改事件提供数据。 |
|
<shape id="_x0000_i1070" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
为 StatementCompleted 事件提供附加信息。 |
|
<shape id="_x0000_i1071" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
在用户访问 DBNull 值时,强类型 DataSet 引发的异常。 |
|
<shape id="_x0000_i1072" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在 DataColumn 的 Expression 属性包含语法错误时引发的异常。 |
|
<shape id="_x0000_i1073" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
用于创建强类型 DataSet。 |
|
<shape id="_x0000_i1074" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
在生成强类型 DataSet 时发生名称冲突的情况下引发的异常。 |
|
<shape id="_x0000_i1075" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示对一组列的限制,列中的所有值必须是唯一的。 |
|
<shape id="_x0000_i1076" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共类"><imagedata src="System.files/image003.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubclass(zh-cn,VS.80).png"></imagedata></shape> |
表示在尝试返回已经删除的 DataRow 版本时引发的异常。 |
<shape id="ctl00_rs1_mainContentContainer_cpe231560_i" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" o:spid="_x0000_i1077" alt=""><imagedata src="System.files/image002.gif" o:href="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif"></imagedata></shape>接口
|
接口
|
说明
|
<shape id="_x0000_i1078" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
将数据源列与 DataSet 列关联起来,并由 DataColumnMapping 类实现,这是 .NET Framework 数据提供程序通常使用的方法。 |
|
<shape id="_x0000_i1079" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
包含一个 DataColumnMapping 对象的集合,并由 DataColumnMappingCollection 实现,这是由 .NET Framework 数据提供程序通常使用的方法。 |
|
<shape id="_x0000_i1080" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
允许对象实现 DataAdapter,并且表示一组用于填充和刷新 DataSet 并更新数据源的方法以及与映射操作有关的属性。 |
|
<shape id="_x0000_i1081" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
表示 Command 对象的参数,也可以表示该对象到 DataSet 列的映射;并且是由访问数据源的 .NET Framework 数据提供程序实现的。 |
|
<shape id="_x0000_i1082" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
收集所有与 Command 对象有关的参数及其到 DataSet 列的映射,并由访问该数据源的 .NET Framework 数据提供程序实现。 |
|
<shape id="_x0000_i1083" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
提供一种方法来读取一个或多个通过在数据源执行命令所获得的只进结果集流,这是由访问关系数据库的 .NET Framework 数据提供程序实现的。 |
|
<shape id="_x0000_i1084" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
使 DataReader 能访问每一行中的列值,由访问关系数据库的 .NET Framework 数据提供程序实现。 |
|
<shape id="_x0000_i1085" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
表示连接到数据源时执行的 SQL 语句,并且是由访问关系数据库的 .NET Framework 数据提供程序实现的。 |
|
<shape id="_x0000_i1086" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
表示到数据源的已打开连接,并且是由访问关系数据库的 .NET Framework 数据提供程序实现的。 |
|
<shape id="_x0000_i1087" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
表示一组与命令有关的属性,用于填充 DataSet 和更新数据源,由访问关系数据库的 .NET Framework 数据提供程序实现。 |
|
<shape id="_x0000_i1088" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
由 Visual Basic .NET 数据设计器使用,用来向 Command 对象表示一个参数,以及向该对象的 DataSet 列映射表示参数(可选)。 |
|
<shape id="_x0000_i1089" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
表示要在数据源上执行的事务,它由访问关系数据库的 .NET Framework 数据提供程序来实现。 |
|
<shape id="_x0000_i1090" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
将源表与 DataSet 中的表关联,并由 DataTableMapping 类实现,DataTableMapping 类由 .NET Framework 数据提供程序共同使用。 |
|
<shape id="_x0000_i1091" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共接口"><imagedata src="System.files/image005.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubinterface(zh-cn,VS.80).png"></imagedata></shape> |
包含 TableMapping 对象的集合,并由 DataTableMappingCollection(通常由 .NET Framework 数据提供程序使用)实现。 |
<shape id="ctl00_rs1_mainContentContainer_cpe231561_i" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" o:spid="_x0000_i1092" alt=""><imagedata src="System.files/image002.gif" o:href="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif"></imagedata></shape>委托
|
委托
|
说明
|
<shape id="_x0000_i1093" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示将处理 ColumnChanging 事件的方法。 |
|
<shape id="_x0000_i1094" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示将处理 DataTable 的 RowChanging、RowChanged、RowDeleting 和 RowDeleted 事件的方法。 |
|
<shape id="_x0000_i1095" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示处理 Clear 方法的方法。 |
|
<shape id="_x0000_i1096" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示处理 NewRow 方法的方法。 |
|
<shape id="_x0000_i1097" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示将处理 FillError 事件的方法。 |
|
<shape id="_x0000_i1098" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示将处理 MergeFailed 事件的方法。 |
|
<shape id="_x0000_i1099" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共委托"><imagedata src="System.files/image007.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubdeligate(zh-cn,VS.80).png"></imagedata></shape> |
表示将处理 StateChange 事件的方法。 |
|
|
StatementCompleted 事件的事件处理程序的委托类型。 |
<shape id="ctl00_rs1_mainContentContainer_cpe231562_i" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" o:spid="_x0000_i1101" alt=""><imagedata src="System.files/image002.gif" o:href="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif"></imagedata></shape>枚举
|
枚举
|
说明
|
<shape id="_x0000_i1102" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
确定在带有 ForeignKeyConstraint 的 DataTable 上调用 AcceptChanges 或 RejectChanges 方法时将发生的操作。 |
|
<shape id="_x0000_i1103" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
提供对查询结果和查询对数据库的影响的说明。 |
|
<shape id="_x0000_i1104" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定如何解释命令字符串。 |
|
<shape id="_x0000_i1105" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定将如何检测和解决对数据源的相互冲突的更改。 |
|
<shape id="_x0000_i1106" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
描述与数据源的连接的当前状态。 |
|
<shape id="_x0000_i1107" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
描述在 DataRow 上执行的操作。 |
|
<shape id="_x0000_i1108" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
获取 DataRow 对象的状态。 |
|
<shape id="_x0000_i1109" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
描述 DataRow 的版本。 |
|
<shape id="_x0000_i1110" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
介绍 DataSet 中 DateTime 列的序列化格式。 |
|
<shape id="_x0000_i1111" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
描述 DataRow 中数据的版本。 |
|
<shape id="_x0000_i1112" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定 .NET Framework 数据提供程序的字段、属性或 Parameter 对象的数据类型。 |
|
<shape id="_x0000_i1113" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定连接的事务锁定行为。 |
|
<shape id="_x0000_i1114" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
标识由 KeyRestrictions 属性标识的连接字符串参数的列表,这些参数或者是被允许的,或者是不被允许的。 |
|
<shape id="_x0000_i1115" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
||
<shape id="_x0000_i1116" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定如何映射 DataColumn。 |
|
<shape id="_x0000_i1117" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
确定源表或源列中缺少映射时发生的操作。 |
|
<shape id="_x0000_i1118" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定在将数据添加到 DataSet 而缺少要求的 DataTable 或 DataColumn 时要采取的操作。 |
|
<shape id="_x0000_i1119" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定查询内的有关 DataSet 的参数的类型。 |
|
<shape id="_x0000_i1120" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定属性 (Property) 的属性 (Attribute)。 |
|
<shape id="_x0000_i1121" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指示在强制 ForeignKeyConstraint 时发生的操作。 |
|
<shape id="_x0000_i1122" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指示类型化 DataSet 的架构序列化模式。 |
|
<shape id="_x0000_i1123" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定在执行 FillSchema 操作时如何处理现有的架构映射。 |
|
<shape id="_x0000_i1124" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
确定 DataSet 的序列化格式。 |
|
<shape id="_x0000_i1125" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定要用于 SqlParameter 中的字段和属性的 SQL Server 特定的数据类型。 |
|
|
指定由 OleDbRowUpdatedEventArgs、OleDbRowUpdatingEventArgs、SqlRowUpdatedEventArgs 或 SqlRowUpdatingEventArgs 类使用的 SQL 查询的类型。 |
|
<shape id="_x0000_i1127" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定如何将查询命令结果应用到正在更新的行。 |
|
<shape id="_x0000_i1128" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定在 Update 期间对当前行和其余行采取的操作。 |
|
<shape id="_x0000_i1129" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定如何将 XML 数据和关系架构读入 DataSet。 |
|
<shape id="_x0000_i1130" style="WIDTH: 12pt; HEIGHT: 12pt" coordsize="21600,21600" type="#_x0000_t75" alt="公共枚举"><imagedata src="System.files/image009.png" o:href="http://msdn.microsoft.com/zh-cn/library/ax3wd0k9.pubenum(zh-cn,VS.80).png"></imagedata></shape> |
指定如何从 DataSet 写入 XML 数据和关系架构。 |