OracleDataAdapter 类

定义

警告

此 API 现已过时。

表示用于填充 DataSet 和更新数据库的一组数据命令和一个数据库连接。Represents a set of data commands and a connection to a database that are used to fill the DataSet and update the database. 此类不能被继承。This class cannot be inherited.

public ref class OracleDataAdapter sealed : System::Data::Common::DbDataAdapter, ICloneable
[System.Obsolete("OracleDataAdapter has been deprecated. https://go.microsoft.com/fwlink/?LinkID=144260", false)]
public sealed class OracleDataAdapter : System.Data.Common.DbDataAdapter, ICloneable
type OracleDataAdapter = class
    inherit DbDataAdapter
    interface IDbDataAdapter
    interface IDataAdapter
    interface ICloneable
Public NotInheritable Class OracleDataAdapter
Inherits DbDataAdapter
Implements ICloneable
继承
属性
实现

注解

此类型已弃用,并将在 .NET Framework 的未来版本中删除。This type is deprecated and will be removed in a future version of the .NET Framework. 有关详细信息,请参阅Oracle 和 ADO.NETFor more information, see Oracle and ADO.NET.

OracleDataAdapter 用作数据和数据库之间的桥梁来检索和保存数据。The OracleDataAdapter serves as a bridge between a DataSet and database for retrieving and saving data. OracleDataAdapter 通过使用 Fill 将数据从数据库加载到 DataSet来提供此桥,并使用 Update 将在 DataSet 中所做的更改发送回数据源。The OracleDataAdapter provides this bridge by using Fill to load data from the database into the DataSet, and using Update to send changes made in the DataSet back to the data source.

OracleDataAdapter 填充 DataSet时,它将为返回的数据创建必要的表和列(如果它们尚不存在)。When the OracleDataAdapter fills a DataSet, it creates the necessary tables and columns for the returned data if they do not already exist. 但是,除非 MissingSchemaAction 属性设置为 AddWithKey,否则不会在隐式创建的架构中包含主键信息。However, primary key information is not included in the implicitly created schema unless the MissingSchemaAction property is set to AddWithKey. 你还可以在使用 FillSchema填充数据之前,OracleDataAdapter 创建 DataSet的架构(包括主键信息)。You may also have the OracleDataAdapter create the schema of the DataSet, including primary key information, before filling it with data using FillSchema. 有关详细信息,请参阅将现有约束添加到数据集For more information, see Adding Existing Constraints to a DataSet.

备注

默认情况下,导入到包含 FillDataTable 的数值字段将映射到 OracleNumber 对象。By default, numeric fields imported to a DataTable with Fill are mapped to OracleNumber objects. 可以通过导入对 OracleNumber精度限制太大或过高的精度的非整数数值来溢出 OracleNumber,并引发 Oracle 异常。It is possible to overflow the OracleNumber, and throw an Oracle exception, by importing a non-integral numeric value that is either too large or too high precision for the OracleNumber's precision limitations. 有关详细信息,请参阅 OracleNumber 的说明。Refer to the description of OracleNumber for more information.

OracleDataAdapter 还包括 SelectCommandInsertCommandDeleteCommandUpdateCommandTableMappings 属性,以便于加载和更新数据。The OracleDataAdapter also includes the SelectCommand, InsertCommand, DeleteCommand, UpdateCommand, and TableMappings properties to facilitate loading and updating of data.

用于 Oracle 的 .NET Framework 数据提供程序不支持批处理 SQL 语句。The .NET Framework Data Provider for Oracle does not support batched SQL statements. 不过,它确实允许使用多个 REF CURSOR 输出参数来填充数据集,每个参数都在各自的 DataTable中。However, it does allow you to use multiple REF CURSOR output parameters to fill a DataSet, each in its own DataTable. 您必须定义参数,将它们标记为输出参数,并指示它们是 REF CURSOR 数据类型。You must define the parameters, mark them as output parameters, and indicate that they are REF CURSOR data types. 请注意,当使用存储过程返回 REF CURSOR 参数填充 OracleDataAdapter 时,不能使用 Update 方法,因为 Oracle 不提供必要的信息来确定当 SQL语句执行。Note that you cannot use the Update method when the OracleDataAdapter is filled using REF CURSOR parameters returned by a stored procedure, because Oracle does not provide the information necessary to determine what the table name and column names are when the SQL statement is executed. 下面C#的示例假定您已经创建了此存储过程。The following C# example assumes that you have created this stored procedure.

在 Oracle 服务器上创建以下 Oracle 包。Create the following Oracle package on the Oracle server.

CREATE OR REPLACE PACKAGE CURSPKG AS   
   TYPE T_CURSOR IS REF CURSOR;   
   PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,   
      IO_CURSOR OUT T_CURSOR);   
   PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,   
      DEPTCURSOR OUT T_CURSOR);  
END CURSPKG;  
/  

在 Oracle 服务器上创建下面的 Oracle 包正文。Create the following Oracle package body on the Oracle server.

CREATE OR REPLACE PACKAGE BODY CURSPKG AS   
    PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,   
                               IO_CURSOR OUT T_CURSOR)   
    IS   
        V_CURSOR T_CURSOR;   
    BEGIN   
        IF N_EMPNO <> 0 THEN   
             OPEN V_CURSOR FOR   
             SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME   
                  FROM EMP, DEPT   
                  WHERE EMP.DEPTNO = DEPT.DEPTNO   
                        AND EMP.EMPNO = N_EMPNO;   
        ELSE   
             OPEN V_CURSOR FOR   
             SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME   
                  FROM EMP, DEPT   
                  WHERE EMP.DEPTNO = DEPT.DEPTNO;   
        END IF;   
        IO_CURSOR := V_CURSOR;   
    END OPEN_ONE_CURSOR;   
    PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,   
                                DEPTCURSOR OUT T_CURSOR)   
    IS   
        V_CURSOR1 T_CURSOR;   
        V_CURSOR2 T_CURSOR;   
    BEGIN   
        OPEN V_CURSOR1 FOR SELECT * FROM EMP;   
        OPEN V_CURSOR2 FOR SELECT * FROM DEPT;   
        EMPCURSOR  := V_CURSOR1;   
        DEPTCURSOR := V_CURSOR2;   
    END OPEN_TWO_CURSORS;   
END CURSPKG;  
 /  

下面C#的示例演示了如何使用存储过程获取表和列的信息。The following C# example demonstrates how you might obtain table and column information using the stored procedure.

// GetConnectionString() returns a connection string for  
// the data source.  
  
string connString = GetConnectionString();  
DataSet ds = new DataSet();  
OracleConnection conn = new OracleConnection(connString);  
OracleCommand cmd = conn.CreateCommand();  
  
cmd.CommandText = "CURSPKG.OPEN_TWO_CURSORS";  
cmd.CommandType = CommandType.StoredProcedure;  
cmd.Parameters.Add("EMPCURSOR", OracleType.Cursor).Direction =   
       ParameterDirection.Output;  
cmd.Parameters.Add("DEPTCURSOR", OracleType.Cursor).Direction =   
       ParameterDirection.Output;  
  
OracleDataAdapter da = new OracleDataAdapter(cmd);  
da.TableMappings.Add("Table", "Emp");  
da.TableMappings.Add("Table1", "Dept");  
da.Fill(ds);  
  
ds.Relations.Add("EmpDept", ds.Tables["Dept"].Columns["Deptno"],   
      ds.Tables["Emp"].Columns["Deptno"], false);  

下面的 Visual Basic 示例演示如何使用 OracleDataAdapter 来使用 Oracle REF CURSOR填充 DataSetThe following Visual Basic example demonstrates how to use an OracleDataAdapter to fill a DataSet using an Oracle REF CURSOR. 这些示例使用 Oracle Scott/Tiger 架构中定义的表,并且需要以下 PL/SQL 包和包正文。These examples use tables that are defined in the Oracle Scott/Tiger schema, and require the following PL/SQL package and package body. 你必须在服务器上创建它们以使用这些示例。You must create these on your server to use the examples.

在 Oracle 服务器上创建以下 Oracle 包。Create the following Oracle package on the Oracle server.

CREATE OR REPLACE PACKAGE CURSPKG AS   
   TYPE T_CURSOR IS REF CURSOR;   
   PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,   
      IO_CURSOR OUT T_CURSOR);   
   PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,   
      DEPTCURSOR OUT T_CURSOR);  
END CURSPKG;  
/  

在 Oracle 服务器上创建下面的 Oracle 包正文。Create the following Oracle package body on the Oracle server.

CREATE OR REPLACE PACKAGE BODY CURSPKG AS   
    PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,   
                               IO_CURSOR OUT T_CURSOR)   
    IS   
        V_CURSOR T_CURSOR;   
    BEGIN   
        IF N_EMPNO <> 0 THEN   
             OPEN V_CURSOR FOR   
             SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME   
                  FROM EMP, DEPT   
                  WHERE EMP.DEPTNO = DEPT.DEPTNO   
                        AND EMP.EMPNO = N_EMPNO;   
        ELSE   
             OPEN V_CURSOR FOR   
             SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME   
                  FROM EMP, DEPT   
                  WHERE EMP.DEPTNO = DEPT.DEPTNO;   
        END IF;   
        IO_CURSOR := V_CURSOR;   
    END OPEN_ONE_CURSOR;   
    PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,   
                                DEPTCURSOR OUT T_CURSOR)   
    IS   
        V_CURSOR1 T_CURSOR;   
        V_CURSOR2 T_CURSOR;   
    BEGIN   
        OPEN V_CURSOR1 FOR SELECT * FROM EMP;   
        OPEN V_CURSOR2 FOR SELECT * FROM DEPT;   
        EMPCURSOR  := V_CURSOR1;   
        DEPTCURSOR := V_CURSOR2;   
    END OPEN_TWO_CURSORS;   
END CURSPKG;  
 /  

此 Visual Basic 示例执行一个 PL/SQL 存储过程,该存储过程返回两个 REF CURSOR 参数,并使用返回的行填充 DataSetThis Visual Basic example executes a PL/SQL stored procedure that returns two REF CURSOR parameters, and fills a DataSet with the rows that are returned.

  
' GetConnectionString() returns a connection string for  
' the data source.  
  
    Dim connString As New String(GetConnectionString())  
    Dim ds As New DataSet()  
    Dim conn As New OracleConnection(connString)  
    Dim cmd As OracleCommand = conn.CreateCommand()  
  
    cmd.CommandText = "CURSPKG.OPEN_TWO_CURSORS"  
    cmd.CommandType = CommandType.StoredProcedure  
    cmd.Parameters.Add("EMPCURSOR", OracleType.Cursor).Direction = _  
       ParameterDirection.Output  
    cmd.Parameters.Add("DEPTCURSOR", OracleType.Cursor).Direction = _  
       ParameterDirection.Output  
  
    Dim da As New OracleDataAdapter(cmd)  
    da.TableMappings.Add("Table", "Emp")  
    da.TableMappings.Add("Table1", "Dept")  
    da.Fill(ds)  
  
    ds.Relations.Add("EmpDept", ds.Tables("Dept").Columns("Deptno"), _  
      ds.Tables("Emp").Columns("Deptno"), False)  

使用 OracleDataAdapter 执行 FillFillSchema 操作后,无论是否可以更新列,DataColumn.ReadOnly 属性始终返回 false,因为 Oracle 服务器不返回此信息。After using the OracleDataAdapter to perform a Fill or FillSchema operation, the DataColumn.ReadOnly property always returns false, regardless of whether a column can be updated or not, because the Oracle server does not return this information.

构造函数

OracleDataAdapter()

初始化 OracleDataAdapter 类的新实例。Initializes a new instance of the OracleDataAdapter class.

OracleDataAdapter(OracleCommand)

用指定的 SQL SELECT 语句初始化 OracleDataAdapter 类的新实例。Initializes a new instance of the OracleDataAdapter class with the specified SQL SELECT statement.

OracleDataAdapter(String, OracleConnection)

用一个 SQL SELECT 语句和一个 OracleDataAdapter 初始化 OracleConnection 类的新实例。Initializes a new instance of the OracleDataAdapter class with an SQL SELECT statement and an OracleConnection.

OracleDataAdapter(String, String)

使用 SQL SELECT 语句和连接字符串初始化 OracleDataAdapter 类的新实例。Initializes a new instance of the OracleDataAdapter class with an SQL SELECT statement and a connection string.

字段

DefaultSourceTableName

DataAdapter 对象用于表映射的默认名称。The default name used by the DataAdapter object for table mappings.

(继承自 DbDataAdapter)

属性

AcceptChangesDuringFill

获取或设置一个值,该值指示在任何 Fill 操作过程中,在将 AcceptChanges() 添加到 DataRow 之后是否在 DataTable 上调用它。Gets or sets a value indicating whether AcceptChanges() is called on a DataRow after it is added to the DataTable during any of the Fill operations.

(继承自 DataAdapter)
AcceptChangesDuringUpdate

获取或设置在 AcceptChanges() 期间是否调用 Update(DataSet)Gets or sets whether AcceptChanges() is called during a Update(DataSet).

(继承自 DataAdapter)
CanRaiseEvents

获取一个指示组件是否可以引发事件的值。Gets a value indicating whether the component can raise an event.

(继承自 Component)
Container

获取 IContainer,它包含 ComponentGets the IContainer that contains the Component.

(继承自 Component)
ContinueUpdateOnError

获取或设置一个值,该值指定在行更新过程中遇到错误时是否生成异常。Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.

(继承自 DataAdapter)
DeleteCommand

获取或设置用于在数据库中删除记录的 SQL 语句或存储过程。Gets or sets an SQL statement or stored procedure used to delete records in the database.

DesignMode

获取一个值,用以指示 Component 当前是否处于设计模式。Gets a value that indicates whether the Component is currently in design mode.

(继承自 Component)
Events

获取附加到此 Component 的事件处理程序的列表。Gets the list of event handlers that are attached to this Component.

(继承自 Component)
FillCommandBehavior

获取或设置用于填充数据适配器的命令的行为。Gets or sets the behavior of the command used to fill the data adapter.

(继承自 DbDataAdapter)
FillLoadOption

获取或设置 LoadOption,后者确定适配器如何从 DataTable 中填充 DbDataReaderGets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.

(继承自 DataAdapter)
InsertCommand

获取或设置用于将新记录插入到数据库中的 SQL 语句或存储过程。Gets or sets an SQL statement or stored procedure used to insert new records into the database.

MissingMappingAction

确定传入数据没有匹配的表或列时需要执行的操作。Determines the action to take when incoming data does not have a matching table or column.

(继承自 DataAdapter)
MissingSchemaAction

确定现有 DataSet 架构与传入数据不匹配时需要执行的操作。Determines the action to take when existing DataSet schema does not match incoming data.

(继承自 DataAdapter)
ReturnProviderSpecificTypes

获取或设置 Fill 方法是应当返回提供程序特定的值,还是返回公用的符合 CLS 的值。Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.

(继承自 DataAdapter)
SelectCommand

获取或设置用于在数据库中选择记录的 SQL 语句或存储过程。Gets or sets an SQL statement or stored procedure used to select records in the database.

Site

获取或设置 ComponentISiteGets or sets the ISite of the Component.

(继承自 Component)
TableMappings

获取一个集合,它提供源表和 DataTable 之间的主映射。Gets a collection that provides the master mapping between a source table and a DataTable.

(继承自 DataAdapter)
UpdateBatchSize

获取或设置一个值,该值启用或禁用批处理支持,并且指定可在一次批处理中执行的命令的数量。Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

UpdateCommand

获取或设置用于在数据库中更新记录的 SQL 语句或存储过程。Gets or sets an SQL statement or stored procedure used to update records in the database.

方法

AddToBatch(IDbCommand)

向当前批处理添加 IDbCommandAdds a IDbCommand to the current batch.

(继承自 DbDataAdapter)
ClearBatch()

从批处理中移除所有 IDbCommand 对象。Removes all IDbCommand objects from the batch.

(继承自 DbDataAdapter)
CloneInternals()

创建此 DataAdapter 实例的一个副本。Creates a copy of this instance of DataAdapter.

(继承自 DataAdapter)
CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
CreateRowUpdatedEvent(DataRow, IDbCommand, StatementType, DataTableMapping)

初始化 RowUpdatedEventArgs 类的新实例。Initializes a new instance of the RowUpdatedEventArgs class.

(继承自 DbDataAdapter)
CreateRowUpdatingEvent(DataRow, IDbCommand, StatementType, DataTableMapping)

初始化 RowUpdatingEventArgs 类的新实例。Initializes a new instance of the RowUpdatingEventArgs class.

(继承自 DbDataAdapter)
CreateTableMappings()

创建一个新的 DataTableMappingCollectionCreates a new DataTableMappingCollection.

(继承自 DataAdapter)
Dispose()

释放由 Component 使用的所有资源。Releases all resources used by the Component.

(继承自 Component)
Dispose(Boolean)

释放由 DbDataAdapter 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the DbDataAdapter and optionally releases the managed resources.

(继承自 DbDataAdapter)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
ExecuteBatch()

执行当前批处理。Executes the current batch.

(继承自 DbDataAdapter)
Fill(DataSet)

DataSet 中添加或刷新行。Adds or refreshes rows in the DataSet.

(继承自 DbDataAdapter)
Fill(DataSet, Int32, Int32, String)

DataSet 的指定范围中添加或刷新行以匹配使用 DataSetDataTable 名称的数据源中的行。Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.

(继承自 DbDataAdapter)
Fill(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior)

使用 DataSet 和源表名称、命令字符串以及命令行为,在 DataSet 的指定范围中添加或刷新某些行以使它们与数据源中对应的行相一致。Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and source table names, command string, and command behavior.

(继承自 DbDataAdapter)
Fill(DataSet, String)

DataSet 中添加或刷新行以匹配使用 DataSetDataTable 名称的数据源中的行。Adds or refreshes rows in the DataSet to match those in the data source using the DataSet and DataTable names.

(继承自 DbDataAdapter)
Fill(DataSet, String, IDataReader, Int32, Int32)

DataSet 的指定范围中添加或刷新行以与使用 DataSetDataTableIDataReader 名称的数据源中的行进行匹配。Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet, DataTable, and IDataReader names.

(继承自 DbDataAdapter)
Fill(DataTable)

DataSet 的指定范围中添加或刷新行,以与使用 DataTable 名称的数据源中的行匹配。Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataTable name.

(继承自 DbDataAdapter)
Fill(DataTable, IDataReader)

DataTable 中添加或刷新行,以与使用指定的 DataTableIDataReader 名称的数据源中的行匹配。Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable and IDataReader names.

(继承自 DbDataAdapter)
Fill(DataTable, IDbCommand, CommandBehavior)

DataTable 中添加或刷新行,以与使用指定的 DataTableIDbCommandCommandBehavior 的数据源中的行匹配。Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable, IDbCommand and CommandBehavior.

(继承自 DbDataAdapter)
Fill(DataTable[], IDataReader, Int32, Int32)

DataTable 对象集合的指定范围中添加或刷新行以与数据源中的行匹配。Adds or refreshes rows in a specified range in the collection of DataTable objects to match those in the data source.

(继承自 DataAdapter)
Fill(DataTable[], Int32, Int32, IDbCommand, CommandBehavior)

DataSet 的指定范围中添加或刷新行以匹配使用 DataSetDataTable 名称的数据源中的行。Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.

(继承自 DbDataAdapter)
Fill(Int32, Int32, DataTable[])

DataTable 中添加或刷新行,以与从指定的记录开始一直检索到指定的最大数目的记录的数据源中的行匹配。Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records.

(继承自 DbDataAdapter)
FillSchema(DataSet, SchemaType)

将名为“Table”的 DataTable 添加到指定的 DataSet 中,并根据指定的 SchemaType 配置架构以匹配数据源中的架构。Adds a DataTable named "Table" to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType.

(继承自 DbDataAdapter)
FillSchema(DataSet, SchemaType, IDbCommand, String, CommandBehavior)

DataTable 添加到指定的 DataSet 中,并根据指定的 SchemaType 配置架构以匹配数据源中的架构。Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType.

(继承自 DbDataAdapter)
FillSchema(DataSet, SchemaType, String)

DataTable 添加到指定的 DataSet 中,并根据指定的 SchemaTypeDataTable 配置架构以匹配数据源中的架构。Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based upon the specified SchemaType and DataTable.

(继承自 DbDataAdapter)
FillSchema(DataSet, SchemaType, String, IDataReader)

向指定的 DataTable 添加一个 DataSetAdds a DataTable to the specified DataSet.

(继承自 DataAdapter)
FillSchema(DataTable, SchemaType)

根据指定的 DataTable 配置指定 SchemaType 的架构。Configures the schema of the specified DataTable based on the specified SchemaType.

(继承自 DbDataAdapter)
FillSchema(DataTable, SchemaType, IDataReader)

向指定的 DataTable 添加一个 DataSetAdds a DataTable to the specified DataSet.

(继承自 DataAdapter)
FillSchema(DataTable, SchemaType, IDbCommand, CommandBehavior)

根据指定的 DataTable、命令字符串以及 SchemaType 值配置指定 CommandBehavior 的架构。Configures the schema of the specified DataTable based on the specified SchemaType, command string, and CommandBehavior values.

(继承自 DbDataAdapter)
GetBatchedParameter(Int32, Int32)

从当前批处理中的其中一个命令返回一个 IDataParameterReturns a IDataParameter from one of the commands in the current batch.

(继承自 DbDataAdapter)
GetBatchedRecordsAffected(Int32, Int32, Exception)

返回与较大的批处理更新内的单次更新尝试有关的信息。Returns information about an individual update attempt within a larger batched update.

(继承自 DbDataAdapter)
GetFillParameters()

获取当执行 SQL SELECT 语句时由用户设置的参数。Gets the parameters set by the user when executing an SQL SELECT statement.

(继承自 DbDataAdapter)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetService(Type)

返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。Returns an object that represents a service provided by the Component or by its Container.

(继承自 Component)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
HasTableMappings()

指示是否已创建了一个 DataTableMappingCollectionIndicates whether a DataTableMappingCollection has been created.

(继承自 DataAdapter)
InitializeBatching()

初始化 DbDataAdapter 的批处理。Initializes batching for the DbDataAdapter.

(继承自 DbDataAdapter)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
OnFillError(FillErrorEventArgs)

引发 FillError 事件。Raises the FillError event.

(继承自 DbDataAdapter)
OnRowUpdated(RowUpdatedEventArgs)

引发 .NET Framework 数据提供程序的 RowUpdated 事件。Raises the RowUpdated event of a .NET Framework data provider.

(继承自 DbDataAdapter)
OnRowUpdating(RowUpdatingEventArgs)

引发 .NET Framework 数据提供程序的 RowUpdating 事件。Raises the RowUpdating event of a .NET Framework data provider.

(继承自 DbDataAdapter)
ResetFillLoadOption()

FillLoadOption 重置为默认状态,并使 Fill(DataSet) 接受 AcceptChangesDuringFillResets FillLoadOption to its default state and causes Fill(DataSet) to honor AcceptChangesDuringFill.

(继承自 DataAdapter)
ShouldSerializeAcceptChangesDuringFill()

确定是否应保持 AcceptChangesDuringFill 属性。Determines whether the AcceptChangesDuringFill property should be persisted.

(继承自 DataAdapter)
ShouldSerializeFillLoadOption()

确定是否应保持 FillLoadOption 属性。Determines whether the FillLoadOption property should be persisted.

(继承自 DataAdapter)
ShouldSerializeTableMappings()

确定一个或多个 DataTableMapping 对象是否存在,并且它们是否应该是持久的。Determines whether one or more DataTableMapping objects exist and they should be persisted.

(继承自 DataAdapter)
TerminateBatching()

结束 DbDataAdapter 的批处理。Ends batching for the DbDataAdapter.

(继承自 DbDataAdapter)
ToString()

返回包含 Component 的名称的 String(如果有)。Returns a String containing the name of the Component, if any. 不应重写此方法。This method should not be overridden.

(继承自 Component)
Update(DataRow[])

通过为 DataSet 中的指定数组中的每个已插入、已更新或已删除的行执行相应的 INSERT、UPDATE 或 DELETE 语句来更新数据库中的值。Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array in the DataSet.

(继承自 DbDataAdapter)
Update(DataRow[], DataTableMapping)

通过为指定的 DataSet 对象数组中的每个已插入、已更新或已删除的行执行相应的 INSERT、UPDATE 或 DELETE 语句来更新数据库中的值。Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of DataSet objects.

(继承自 DbDataAdapter)
Update(DataSet)

通过为指定的 DataSet 中的每个已插入、已更新或已删除的行执行相应的 INSERT、UPDATE 或 DELETE 语句来更新数据库中的值。Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.

(继承自 DbDataAdapter)
Update(DataSet, String)

通过为具有指定名称 DataSetDataTable 中的每个已插入、已更新或已删除的行执行相应的 INSERT、UPDATE 或 DELETE 语句来更新数据库中的值。Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet with the specified DataTable name.

(继承自 DbDataAdapter)
Update(DataTable)

通过为指定的 DataTable 中的每个已插入、已更新或已删除的行执行相应的 INSERT、UPDATE 或 DELETE 语句来更新数据库中的值。Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataTable.

(继承自 DbDataAdapter)

事件

Disposed

当通过调用 Dispose() 方法释放组件时发生。Occurs when the component is disposed by a call to the Dispose() method.

(继承自 Component)
FillError

在填充操作过程中出现错误时返回。Returned when an error occurs during a fill operation.

(继承自 DbDataAdapter)
RowUpdated

在对数据库执行命令后的更新操作过程中发生。Occurs during an update operation after a command is executed against the database.

RowUpdating

在对数据源执行命令前的 Update(DataSet) 过程中发生。Occurs during Update(DataSet) before a command is executed against the data source.

显式界面实现

ICloneable.Clone()

有关此成员的说明,请参见 Clone()For a description of this member, see Clone().

IDataAdapter.TableMappings

指示如何将源表映射到数据集表。Indicates how a source table is mapped to a dataset table.

(继承自 DataAdapter)
IDbDataAdapter.DeleteCommand

有关此成员的说明,请参见 DeleteCommandFor a description of this member, see DeleteCommand.

IDbDataAdapter.InsertCommand

有关此成员的说明,请参见 InsertCommandFor a description of this member, see InsertCommand.

IDbDataAdapter.SelectCommand

有关此成员的说明,请参见 SelectCommandFor a description of this member, see SelectCommand.

IDbDataAdapter.UpdateCommand

有关此成员的说明,请参见 UpdateCommandFor a description of this member, see UpdateCommand.

适用于

另请参阅