Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1663 lines (1409 sloc) 101 KB
<Type Name="OracleDataAdapter" FullName="System.Data.OracleClient.OracleDataAdapter">
<TypeSignature Language="C#" Value="public sealed class OracleDataAdapter : System.Data.Common.DbDataAdapter, ICloneable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit OracleDataAdapter extends System.Data.Common.DbDataAdapter implements class System.Data.IDataAdapter, class System.Data.IDbDataAdapter, class System.ICloneable" />
<TypeSignature Language="DocId" Value="T:System.Data.OracleClient.OracleDataAdapter" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class OracleDataAdapter&#xA;Inherits DbDataAdapter&#xA;Implements ICloneable" />
<TypeSignature Language="C++ CLI" Value="public ref class OracleDataAdapter sealed : System::Data::Common::DbDataAdapter, ICloneable" />
<TypeSignature Language="F#" Value="type OracleDataAdapter = class&#xA; inherit DbDataAdapter&#xA; interface IDbDataAdapter&#xA; interface IDataAdapter&#xA; interface ICloneable" />
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Data.Common.DbDataAdapter</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Data.IDataAdapter</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Data.IDbDataAdapter</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ICloneable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultEvent("RowUpdated")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.OracleDataAdapterDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.OracleDataAdapterToolboxItem, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.OracleDataAdapterDesigner, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.OracleDataAdapterToolboxItem, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.OracleDataAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.OracleDataAdapterToolboxItem, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.Obsolete("OracleDataAdapter has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260", false)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a set of data commands and a connection to a database that are used to fill the <see cref="T:System.Data.DataSet" /> and update the database. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This type is deprecated and will be removed in a future version of the .NET Framework. For more information, see [Oracle and ADO.NET](~/docs/framework/data/adonet/oracle-and-adonet.md).
The <xref:System.Data.OracleClient.OracleDataAdapter> serves as a bridge between a **DataSet** and database for retrieving and saving data. The <xref:System.Data.OracleClient.OracleDataAdapter> provides this bridge by using <xref:System.Data.Common.DbDataAdapter.Fill%2A> to load data from the database into the <xref:System.Data.DataSet>, and using <xref:System.Data.Common.DbDataAdapter.Update%2A> to send changes made in the <xref:System.Data.DataSet> back to the data source.
When the <xref:System.Data.OracleClient.OracleDataAdapter> fills a <xref:System.Data.DataSet>, it creates the necessary tables and columns for the returned data if they do not already exist. However, primary key information is not included in the implicitly created schema unless the <xref:System.Data.Common.DataAdapter.MissingSchemaAction%2A> property is set to <xref:System.Data.MissingSchemaAction.AddWithKey>. You may also have the <xref:System.Data.OracleClient.OracleDataAdapter> create the schema of the <xref:System.Data.DataSet>, including primary key information, before filling it with data using <xref:System.Data.Common.DbDataAdapter.FillSchema%2A>. For more information, see [Adding Existing Constraints to a DataSet](~/docs/framework/data/adonet/adding-existing-constraints-to-a-dataset.md).
> [!NOTE]
> By default, numeric fields imported to a <xref:System.Data.DataTable> with <xref:System.Data.Common.DbDataAdapter.Fill%2A> are mapped to <xref:System.Data.OracleClient.OracleNumber> objects. It is possible to overflow the <xref:System.Data.OracleClient.OracleNumber>, and throw an Oracle exception, by importing a non-integral numeric value that is either too large or too high precision for the <xref:System.Data.OracleClient.OracleNumber>'s precision limitations. Refer to the description of <xref:System.Data.OracleClient.OracleNumber> for more information.
The <xref:System.Data.OracleClient.OracleDataAdapter> also includes the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A>, <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A>, <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A>, <xref:System.Data.OracleClient.OracleDataAdapter.UpdateCommand%2A>, and `TableMappings` properties to facilitate loading and updating of data.
The .NET Framework Data Provider for Oracle does not support batched SQL statements. However, it does allow you to use multiple `REF CURSOR` output parameters to fill a **DataSet**, each in its own <xref:System.Data.DataTable>. You must define the parameters, mark them as output parameters, and indicate that they are `REF CURSOR` data types. Note that you cannot use the <xref:System.Data.Common.DbDataAdapter.Update%2A> method when the <xref:System.Data.OracleClient.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. The following C# example assumes that you have created this stored procedure.
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;
/
```
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;
/
```
The following C# example demonstrates how you might obtain table and column information using the stored procedure.
```csharp
// 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);
```
The following Visual Basic example demonstrates how to use an <xref:System.Data.OracleClient.OracleDataAdapter> to fill a <xref:System.Data.DataSet> using an Oracle `REF CURSOR`. 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.
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;
/
```
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;
/
```
This Visual Basic example executes a PL/SQL stored procedure that returns two `REF CURSOR` parameters, and fills a <xref:System.Data.DataSet> with the rows that are returned.
```vb
' 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)
```
After using the <xref:System.Data.OracleClient.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.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OracleDataAdapter ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; OracleDataAdapter();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you create an instance of <xref:System.Data.OracleClient.OracleDataAdapter>, the following read/write properties are set to their default values, as shown in the table.
|Properties|Default value|
|----------------|-------------------|
|<xref:System.Data.Common.DataAdapter.MissingMappingAction%2A>|`MissingMappingAction.Passthrough`|
|<xref:System.Data.Common.DataAdapter.MissingSchemaAction%2A>|`MissingSchemaAction.Add`|
You can change the value of any of these properties through a separate call to the property.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets some of its properties.
```vb
Public Sub CreateOracleDataAdapter()
Dim myOracleConnection As OracleConnection = New OracleConnection("Data Source=Oracle8i;Integrated Security=yes")
Dim custDA As OracleDataAdapter = New OracleDataAdapter
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey
custDA.SelectCommand = New OracleCommand("SELECT DeptNo, DName FROM Dept", myOracleConnection)
custDA.InsertCommand = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (:pDeptNo, :pDName)", myOracleConnection)
custDA.UpdateCommand = New OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " & _
"WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.DeleteCommand = New OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
End Sub
```
```csharp
public static void CreateOracleDataAdapter()
{
OracleConnection myOracleConnection = new OracleConnection("Data Source=Oracle8i;Integrated Security=yes");
OracleDataAdapter custDA = new OracleDataAdapter();
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey;
custDA.SelectCommand = new OracleCommand("SELECT DeptNo, CompanyName FROM Dept", myOracleConnection);
custDA.InsertCommand = new OracleCommand("INSERT INTO Dept (DeptNo, CompanyName) " +
"VALUES (:pDeptNo, :pCompanyName)", myOracleConnection);
custDA.UpdateCommand = new OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, CompanyName = :pCompanyName " +
"WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.DeleteCommand = new OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.InsertCommand.Parameters.Add("pCompanyName", OracleType.VarChar, 14, "CompanyName");
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.UpdateCommand.Parameters.Add("pCompanyName", OracleType.VarChar, 14, "CompanyName");
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OracleDataAdapter (System.Data.OracleClient.OracleCommand selectCommand);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Data.OracleClient.OracleCommand selectCommand) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.#ctor(System.Data.OracleClient.OracleCommand)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (selectCommand As OracleCommand)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; OracleDataAdapter(System::Data::OracleClient::OracleCommand ^ selectCommand);" />
<MemberSignature Language="F#" Value="new System.Data.OracleClient.OracleDataAdapter : System.Data.OracleClient.OracleCommand -&gt; System.Data.OracleClient.OracleDataAdapter" Usage="new System.Data.OracleClient.OracleDataAdapter selectCommand" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="selectCommand" Type="System.Data.OracleClient.OracleCommand" />
</Parameters>
<Docs>
<param name="selectCommand">An <see cref="T:System.Data.OracleClient.OracleCommand" /> that is an SQL SELECT statement or stored procedure, and is set as the <see cref="P:System.Data.OracleClient.OracleDataAdapter.SelectCommand" /> property of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> class with the specified SQL SELECT statement.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This implementation of the <xref:System.Data.OracleClient.OracleDataAdapter> constructor sets the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> property to the value specified in the `selectCommand` parameter.
When you create an instance of <xref:System.Data.OracleClient.OracleDataAdapter>, the following read/write properties are set to their default values, as shown in the table.
|Properties|Initial value|
|----------------|-------------------|
|<xref:System.Data.Common.DataAdapter.MissingMappingAction%2A>|`MissingMappingAction.Passthrough`|
|<xref:System.Data.Common.DataAdapter.MissingSchemaAction%2A>|`MissingSchemaAction.Add`|
You can change the value of any of these properties through a separate call to the property.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets some of its properties.
```vb
Public Sub CreateOracleDataAdapter()
Dim myOracleConnection As OracleConnection = New OracleConnection("Data Source=Oracle8i;Integrated Security=yes")
Dim myOracleCommand As OracleCommand = New OracleCommand("SELECT DeptNo, DName FROM Dept", myOracleConnection)
Dim custDA As OracleDataAdapter = New OracleDataAdapter(myOracleCommand)
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey
custDA.InsertCommand = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (:pDeptNo, :pDName)", myOracleConnection)
custDA.UpdateCommand = New OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " & _
"WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.DeleteCommand = New OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
End Sub
```
```csharp
public static void CreateOracleDataAdapter()
{
OracleConnection myOracleConnection = new OracleConnection("Data Source=Oracle8i;Integrated Security=yes");
OracleCommand myOracleCommand = new OracleCommand("SELECT DeptNo, DName FROM Dept", myOracleConnection);
OracleDataAdapter custDA = new OracleDataAdapter(myOracleCommand);
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey;
custDA.InsertCommand = new OracleCommand("INSERT INTO Dept (DeptNo, DName) " +
"VALUES (:pDeptNo, :pDName)", myOracleConnection);
custDA.UpdateCommand = new OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " +
"WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.DeleteCommand = new OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OracleDataAdapter (string selectCommandText, System.Data.OracleClient.OracleConnection selectConnection);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string selectCommandText, class System.Data.OracleClient.OracleConnection selectConnection) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.#ctor(System.String,System.Data.OracleClient.OracleConnection)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (selectCommandText As String, selectConnection As OracleConnection)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; OracleDataAdapter(System::String ^ selectCommandText, System::Data::OracleClient::OracleConnection ^ selectConnection);" />
<MemberSignature Language="F#" Value="new System.Data.OracleClient.OracleDataAdapter : string * System.Data.OracleClient.OracleConnection -&gt; System.Data.OracleClient.OracleDataAdapter" Usage="new System.Data.OracleClient.OracleDataAdapter (selectCommandText, selectConnection)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="selectCommandText" Type="System.String" />
<Parameter Name="selectConnection" Type="System.Data.OracleClient.OracleConnection" />
</Parameters>
<Docs>
<param name="selectCommandText">A string that is an SQL SELECT statement or stored procedure to be used by the <see cref="P:System.Data.OracleClient.OracleDataAdapter.SelectCommand" /> property of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" />.</param>
<param name="selectConnection">An <see cref="T:System.Data.OracleClient.OracleConnection" /> that represents the connection.</param>
<summary>Initializes a new instance of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> class with an SQL SELECT statement and an <see cref="T:System.Data.OracleClient.OracleConnection" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This implementation of the <xref:System.Data.OracleClient.OracleDataAdapter> can be useful in an application that must call the `Fill` method for two or more <xref:System.Data.OracleClient.OracleDataAdapter> objects.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets some of its properties.
```vb
Public Sub CreateOracleDataAdapter()
Dim myOracleConnection As OracleConnection = New OracleConnection("Data Source=Oracle8i;Integrated Security=yes")
Dim mySelectText As String = "SELECT DeptNo, DName FROM Dept"
Dim custDA As OracleDataAdapter = New OracleDataAdapter(mySelectText, myOracleConnection)
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey
custDA.InsertCommand = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (:pDeptNo, :pDName)", myOracleConnection)
custDA.UpdateCommand = New OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " & _
"WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.DeleteCommand = New OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
End Sub
```
```csharp
public static void CreateOracleDataAdapter()
{
OracleConnection myOracleConnection = new OracleConnection("Data Source=Oracle8i;Integrated Security=yes");
string mySelectText = "SELECT DeptNo, DName FROM Dept";
OracleDataAdapter custDA = new OracleDataAdapter(mySelectText, myOracleConnection );
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey;
custDA.InsertCommand = new OracleCommand("INSERT INTO Dept (DeptNo, DName) " +
"VALUES (:pDeptNo, :pDName)", myOracleConnection);
custDA.UpdateCommand = new OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " +
"WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.DeleteCommand = new OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OracleDataAdapter (string selectCommandText, string selectConnectionString);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string selectCommandText, string selectConnectionString) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.#ctor(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (selectCommandText As String, selectConnectionString As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; OracleDataAdapter(System::String ^ selectCommandText, System::String ^ selectConnectionString);" />
<MemberSignature Language="F#" Value="new System.Data.OracleClient.OracleDataAdapter : string * string -&gt; System.Data.OracleClient.OracleDataAdapter" Usage="new System.Data.OracleClient.OracleDataAdapter (selectCommandText, selectConnectionString)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="selectCommandText" Type="System.String" />
<Parameter Name="selectConnectionString" Type="System.String" />
</Parameters>
<Docs>
<param name="selectCommandText">A string that is an SQL SELECT statement or stored procedure to be used by the <see cref="P:System.Data.OracleClient.OracleDataAdapter.SelectCommand" /> property of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" />.</param>
<param name="selectConnectionString">The connection string.</param>
<summary>Initializes a new instance of the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> class with an SQL SELECT statement and a connection string.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets some of its properties.
```vb
Public Sub CreateOracleDataAdapter()
Dim myConnectionText As String = "Data Source=Oracle8i;Integrated Security=yes"
Dim mySelectText As String = "SELECT DeptNo, DName FROM Dept"
Dim custDA As OracleDataAdapter = New OracleDataAdapter(mySelectText, myConnectionText )
Dim myOracleConnection As OracleConnection = custDA.SelectCommand.Connection
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey
custDA.InsertCommand = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (:pDeptNo, :pDName)", myOracleConnection)
custDA.UpdateCommand = New OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " & _
"WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.DeleteCommand = New OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection)
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName")
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original
End Sub
```
```csharp
public static void CreateOracleDataAdapter()
{
string myConnectionText = "Data Source=Oracle8i;Integrated Security=yes";
string mySelectText = "SELECT DeptNo, DName FROM Dept";
OracleDataAdapter custDA = new OracleDataAdapter(mySelectText, myConnectionText );
OracleConnection myOracleConnection = custDA.SelectCommand.Connection;
custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey;
custDA.InsertCommand = new OracleCommand("INSERT INTO Dept (DeptNo, DName) " +
"VALUES (:pDeptNo, :pDName)", myOracleConnection);
custDA.UpdateCommand = new OracleCommand("UPDATE Dept SET DeptNo = :pDeptNo, DName = :pDName " +
"WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.DeleteCommand = new OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", myOracleConnection);
custDA.InsertCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.InsertCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
custDA.UpdateCommand.Parameters.Add("pDName", OracleType.VarChar, 14, "DName");
custDA.UpdateCommand.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
custDA.DeleteCommand.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo").SourceVersion = DataRowVersion.Original;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="AddToBatch">
<MemberSignature Language="C#" Value="protected override int AddToBatch (System.Data.IDbCommand command);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance int32 AddToBatch(class System.Data.IDbCommand command) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.AddToBatch(System.Data.IDbCommand)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function AddToBatch (command As IDbCommand) As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override int AddToBatch(System::Data::IDbCommand ^ command);" />
<MemberSignature Language="F#" Value="override this.AddToBatch : System.Data.IDbCommand -&gt; int" Usage="oracleDataAdapter.AddToBatch command" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="command" Type="System.Data.IDbCommand" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="command">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ClearBatch">
<MemberSignature Language="C#" Value="protected override void ClearBatch ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void ClearBatch() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.ClearBatch" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub ClearBatch ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void ClearBatch();" />
<MemberSignature Language="F#" Value="override this.ClearBatch : unit -&gt; unit" Usage="oracleDataAdapter.ClearBatch " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateRowUpdatedEvent">
<MemberSignature Language="C#" Value="protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent (System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(class System.Data.DataRow dataRow, class System.Data.IDbCommand command, valuetype System.Data.StatementType statementType, class System.Data.Common.DataTableMapping tableMapping) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.CreateRowUpdatedEvent(System.Data.DataRow,System.Data.IDbCommand,System.Data.StatementType,System.Data.Common.DataTableMapping)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Data::Common::RowUpdatedEventArgs ^ CreateRowUpdatedEvent(System::Data::DataRow ^ dataRow, System::Data::IDbCommand ^ command, System::Data::StatementType statementType, System::Data::Common::DataTableMapping ^ tableMapping);" />
<MemberSignature Language="F#" Value="override this.CreateRowUpdatedEvent : System.Data.DataRow * System.Data.IDbCommand * System.Data.StatementType * System.Data.Common.DataTableMapping -&gt; System.Data.Common.RowUpdatedEventArgs" Usage="oracleDataAdapter.CreateRowUpdatedEvent (dataRow, command, statementType, tableMapping)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.Common.RowUpdatedEventArgs</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRow" Type="System.Data.DataRow" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="statementType" Type="System.Data.StatementType" />
<Parameter Name="tableMapping" Type="System.Data.Common.DataTableMapping" />
</Parameters>
<Docs>
<param name="dataRow">To be added.</param>
<param name="command">To be added.</param>
<param name="statementType">To be added.</param>
<param name="tableMapping">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateRowUpdatingEvent">
<MemberSignature Language="C#" Value="protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent (System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(class System.Data.DataRow dataRow, class System.Data.IDbCommand command, valuetype System.Data.StatementType statementType, class System.Data.Common.DataTableMapping tableMapping) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.CreateRowUpdatingEvent(System.Data.DataRow,System.Data.IDbCommand,System.Data.StatementType,System.Data.Common.DataTableMapping)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Data::Common::RowUpdatingEventArgs ^ CreateRowUpdatingEvent(System::Data::DataRow ^ dataRow, System::Data::IDbCommand ^ command, System::Data::StatementType statementType, System::Data::Common::DataTableMapping ^ tableMapping);" />
<MemberSignature Language="F#" Value="override this.CreateRowUpdatingEvent : System.Data.DataRow * System.Data.IDbCommand * System.Data.StatementType * System.Data.Common.DataTableMapping -&gt; System.Data.Common.RowUpdatingEventArgs" Usage="oracleDataAdapter.CreateRowUpdatingEvent (dataRow, command, statementType, tableMapping)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.Common.RowUpdatingEventArgs</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRow" Type="System.Data.DataRow" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="statementType" Type="System.Data.StatementType" />
<Parameter Name="tableMapping" Type="System.Data.Common.DataTableMapping" />
</Parameters>
<Docs>
<param name="dataRow">To be added.</param>
<param name="command">To be added.</param>
<param name="statementType">To be added.</param>
<param name="tableMapping">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DeleteCommand">
<MemberSignature Language="C#" Value="public System.Data.OracleClient.OracleCommand DeleteCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.OracleClient.OracleCommand DeleteCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.DeleteCommand" />
<MemberSignature Language="VB.NET" Value="Public Property DeleteCommand As OracleCommand" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::OracleClient::OracleCommand ^ DeleteCommand { System::Data::OracleClient::OracleCommand ^ get(); void set(System::Data::OracleClient::OracleCommand ^ value); };" />
<MemberSignature Language="F#" Value="member this.DeleteCommand : System.Data.OracleClient.OracleCommand with get, set" Usage="System.Data.OracleClient.OracleDataAdapter.DeleteCommand" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an SQL statement or stored procedure used to delete records in the database.</summary>
<value>An <see cref="T:System.Data.OracleClient.OracleCommand" /> used during an update operation to delete records in the database that correspond to deleted rows in the <see langword="DataSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A> property is assigned to a previously created <xref:System.Data.OracleClient.OracleCommand>, the <xref:System.Data.OracleClient.OracleCommand> is not cloned. Instead, the <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A> maintains a reference to the previously created <xref:System.Data.OracleClient.OracleCommand>.
During an update operation, if <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A> is not set and primary key information is present in the <xref:System.Data.DataSet>, you can use the <xref:System.Data.OracleClient.OracleCommandBuilder> class to automatically generate the <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A>, and additional commands needed to reconcile the <xref:System.Data.DataSet> to the database. To do this, set the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> property of the <xref:System.Data.OracleClient.OracleDataAdapter>. The generation logic also requires key column information to be present in the <xref:System.Data.DataSet>. For more information see [Generating Commands with CommandBuilders](~/docs/framework/data/adonet/generating-commands-with-commandbuilders.md).
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> and <xref:System.Data.OracleClient.OracleDataAdapter.DeleteCommand%2A> properties. It assumes you have already created an <xref:System.Data.OracleClient.OracleConnection> object.
```vb
Public Shared Function CreateCustomerAdapter(conn As OracleConnection) As OracleDataAdapter
Dim da As OracleDataAdapter = New OracleDataAdapter()
Dim cmd As OracleCommand
Dim parm As OracleParameter
' Create the SelectCommand.
cmd = New OracleCommand("SELECT * FROM Dept " & _
"WHERE DName = :pDName AND Loc = :pLoc", conn)
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14)
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13)
da.SelectCommand = cmd
' Create the DeleteCommand.
cmd = New OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", conn)
parm = cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
parm.SourceVersion = DataRowVersion.Original
da.DeleteCommand = cmd
Return da
End Function
```
```csharp
public static OracleDataAdapter CreateCustomerAdapter(OracleConnection conn)
{
OracleDataAdapter da = new OracleDataAdapter();
OracleCommand cmd;
OracleParameter parm;
// Create the SelectCommand.
cmd = new OracleCommand("SELECT * FROM Dept " +
"WHERE DName = :pDName AND Loc = :pLoc", conn);
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14);
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13);
da.SelectCommand = cmd;
// Create the DeleteCommand.
cmd = new OracleCommand("DELETE FROM Dept WHERE DeptNo = :pDeptNo", conn);
parm = cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
parm.SourceVersion = DataRowVersion.Original;
da.DeleteCommand = cmd;
return da;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="ExecuteBatch">
<MemberSignature Language="C#" Value="protected override int ExecuteBatch ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance int32 ExecuteBatch() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.ExecuteBatch" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ExecuteBatch () As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override int ExecuteBatch();" />
<MemberSignature Language="F#" Value="override this.ExecuteBatch : unit -&gt; int" Usage="oracleDataAdapter.ExecuteBatch " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetBatchedParameter">
<MemberSignature Language="C#" Value="protected override System.Data.IDataParameter GetBatchedParameter (int commandIdentifier, int parameterIndex);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Data.IDataParameter GetBatchedParameter(int32 commandIdentifier, int32 parameterIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.GetBatchedParameter(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetBatchedParameter (commandIdentifier As Integer, parameterIndex As Integer) As IDataParameter" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Data::IDataParameter ^ GetBatchedParameter(int commandIdentifier, int parameterIndex);" />
<MemberSignature Language="F#" Value="override this.GetBatchedParameter : int * int -&gt; System.Data.IDataParameter" Usage="oracleDataAdapter.GetBatchedParameter (commandIdentifier, parameterIndex)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDataParameter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="commandIdentifier" Type="System.Int32" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="parameterIndex" Type="System.Int32" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="commandIdentifier">To be added.</param>
<param name="parameterIndex">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetBatchedRecordsAffected">
<MemberSignature Language="C#" Value="protected override bool GetBatchedRecordsAffected (int commandIdentifier, out int recordsAffected, out Exception error);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool GetBatchedRecordsAffected(int32 commandIdentifier, [out] int32&amp; recordsAffected, [out] class System.Exception&amp; error) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.GetBatchedRecordsAffected(System.Int32,System.Int32@,System.Exception@)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetBatchedRecordsAffected (commandIdentifier As Integer, ByRef recordsAffected As Integer, ByRef error As Exception) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override bool GetBatchedRecordsAffected(int commandIdentifier, [Runtime::InteropServices::Out] int % recordsAffected, [Runtime::InteropServices::Out] Exception ^ % error);" />
<MemberSignature Language="F#" Value="override this.GetBatchedRecordsAffected : int * int * Exception -&gt; bool" Usage="oracleDataAdapter.GetBatchedRecordsAffected (commandIdentifier, recordsAffected, error)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="commandIdentifier" Type="System.Int32" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="recordsAffected" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="error" Type="System.Exception" RefType="out" Index="2" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="commandIdentifier">To be added.</param>
<param name="recordsAffected">To be added.</param>
<param name="error">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="InitializeBatching">
<MemberSignature Language="C#" Value="protected override void InitializeBatching ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void InitializeBatching() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.InitializeBatching" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub InitializeBatching ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void InitializeBatching();" />
<MemberSignature Language="F#" Value="override this.InitializeBatching : unit -&gt; unit" Usage="oracleDataAdapter.InitializeBatching " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="InsertCommand">
<MemberSignature Language="C#" Value="public System.Data.OracleClient.OracleCommand InsertCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.OracleClient.OracleCommand InsertCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.InsertCommand" />
<MemberSignature Language="VB.NET" Value="Public Property InsertCommand As OracleCommand" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::OracleClient::OracleCommand ^ InsertCommand { System::Data::OracleClient::OracleCommand ^ get(); void set(System::Data::OracleClient::OracleCommand ^ value); };" />
<MemberSignature Language="F#" Value="member this.InsertCommand : System.Data.OracleClient.OracleCommand with get, set" Usage="System.Data.OracleClient.OracleDataAdapter.InsertCommand" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an SQL statement or stored procedure used to insert new records into the database.</summary>
<value>An <see cref="T:System.Data.OracleClient.OracleCommand" /> used during an update operation to insert records in the database that correspond to new rows in the <see cref="T:System.Data.DataSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> property is assigned to a previously created <xref:System.Data.OracleClient.OracleCommand> object, the <xref:System.Data.OracleClient.OracleCommand> is not cloned. Instead, <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> maintains a reference to the previously created <xref:System.Data.OracleClient.OracleCommand>.
During an update operation, if <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> is not set and primary key information is present in the <xref:System.Data.DataSet>, you can use the <xref:System.Data.OracleClient.OracleCommandBuilder> class to automatically generate <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A>, and additional commands needed to reconcile the <xref:System.Data.DataSet> to the database. To do this, set the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> property of the <xref:System.Data.OracleClient.OracleDataAdapter>. The generation logic also requires key column information to be present in the <xref:System.Data.DataSet>. For more information see [Generating Commands with CommandBuilders](~/docs/framework/data/adonet/generating-commands-with-commandbuilders.md).
> [!NOTE]
> If execution of this command returns rows, these rows may be added to the <xref:System.Data.DataSet> depending upon how you set the <xref:System.Data.OracleClient.OracleCommand.UpdatedRowSource%2A> property of the <xref:System.Data.OracleClient.OracleCommand> object.
When you update a column with the `LONG RAW` data type, an exception is thrown when you enter a value of `NULL` in the column. The Oracle `LONG RAW` data type is a deprecated type in Oracle version 8.0. To avoid this error, use the `BLOB` data type instead of `LONG RAW`.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> and <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> properties. It assumes you have already created an <xref:System.Data.OracleClient.OracleConnection> object.
```vb
Public Shared Function CreateCustomerAdapter(conn As OracleConnection) As OracleDataAdapter
Dim da As OracleDataAdapter = New OracleDataAdapter()
Dim cmd As OracleCommand
' Create the SelectCommand.
cmd = New OracleCommand("SELECT * FROM Dept " & _
"WHERE DName = :pDName AND Loc = :pLoc", conn)
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14)
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13)
da.SelectCommand = cmd
' Create the InsertCommand.
cmd = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (:pDeptNo, :pDName)", conn)
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName")
da.InsertCommand = cmd
Return da
End Function
```
```csharp
public static OracleDataAdapter CreateCustomerAdapter(OracleConnection conn)
{
OracleDataAdapter da = new OracleDataAdapter();
OracleCommand cmd;
// Create the SelectCommand.
cmd = new OracleCommand("SELECT * FROM Dept " +
"WHERE DName = :pDName AND Loc = :pLoc", conn);
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14);
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13);
da.SelectCommand = cmd;
// Create the InsertCommand.
cmd = new OracleCommand("INSERT INTO Dept (DeptNo, DName) " +
"VALUES (:pDeptNo, :pDName)", conn);
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName");
da.InsertCommand = cmd;
return da;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="OnRowUpdated">
<MemberSignature Language="C#" Value="protected override void OnRowUpdated (System.Data.Common.RowUpdatedEventArgs value);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnRowUpdated(class System.Data.Common.RowUpdatedEventArgs value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnRowUpdated (value As RowUpdatedEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void OnRowUpdated(System::Data::Common::RowUpdatedEventArgs ^ value);" />
<MemberSignature Language="F#" Value="override this.OnRowUpdated : System.Data.Common.RowUpdatedEventArgs -&gt; unit" Usage="oracleDataAdapter.OnRowUpdated value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Data.Common.RowUpdatedEventArgs" />
</Parameters>
<Docs>
<param name="value">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnRowUpdating">
<MemberSignature Language="C#" Value="protected override void OnRowUpdating (System.Data.Common.RowUpdatingEventArgs value);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnRowUpdating(class System.Data.Common.RowUpdatingEventArgs value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnRowUpdating (value As RowUpdatingEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void OnRowUpdating(System::Data::Common::RowUpdatingEventArgs ^ value);" />
<MemberSignature Language="F#" Value="override this.OnRowUpdating : System.Data.Common.RowUpdatingEventArgs -&gt; unit" Usage="oracleDataAdapter.OnRowUpdating value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Data.Common.RowUpdatingEventArgs" />
</Parameters>
<Docs>
<param name="value">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RowUpdated">
<MemberSignature Language="C#" Value="public event System.Data.OracleClient.OracleRowUpdatedEventHandler RowUpdated;" />
<MemberSignature Language="ILAsm" Value=".event class System.Data.OracleClient.OracleRowUpdatedEventHandler RowUpdated" />
<MemberSignature Language="DocId" Value="E:System.Data.OracleClient.OracleDataAdapter.RowUpdated" />
<MemberSignature Language="VB.NET" Value="Public Custom Event RowUpdated As OracleRowUpdatedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Data::OracleClient::OracleRowUpdatedEventHandler ^ RowUpdated;" />
<MemberSignature Language="F#" Value="member this.RowUpdated : System.Data.OracleClient.OracleRowUpdatedEventHandler " Usage="member this.RowUpdated : System.Data.OracleClient.OracleRowUpdatedEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleRowUpdatedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs during an update operation after a command is executed against the database.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When using the `Update` method, there are two events that occur per data row updated. The order of execution is as follows:
1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
2. The `OnRowUpdating` event is raised.
3. The command executes.
4. If the `UpdateRowSource` enumeration is set to `FirstReturnedRecord`, the first returned result is placed in the **DataRow**.
5. If there are output parameters, they are placed in the **DataRow**.
6. The `OnRowUpdated` event is raised.
7. `AcceptChanges` is called.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RowUpdating">
<MemberSignature Language="C#" Value="public event System.Data.OracleClient.OracleRowUpdatingEventHandler RowUpdating;" />
<MemberSignature Language="ILAsm" Value=".event class System.Data.OracleClient.OracleRowUpdatingEventHandler RowUpdating" />
<MemberSignature Language="DocId" Value="E:System.Data.OracleClient.OracleDataAdapter.RowUpdating" />
<MemberSignature Language="VB.NET" Value="Public Custom Event RowUpdating As OracleRowUpdatingEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Data::OracleClient::OracleRowUpdatingEventHandler ^ RowUpdating;" />
<MemberSignature Language="F#" Value="member this.RowUpdating : System.Data.OracleClient.OracleRowUpdatingEventHandler " Usage="member this.RowUpdating : System.Data.OracleClient.OracleRowUpdatingEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleRowUpdatingEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs during <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> before a command is executed against the data source.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When using the `Update` method, there are two events that occur per data row updated. The order of execution is as follows:
1. The values in the <xref:System.Data.DataRow> are moved to the parameter values.
2. The `OnRowUpdating` event is raised.
3. The command executes.
4. If the `UpdateRowSource` enumeration is set to `FirstReturnedRecord`, the first returned result is placed in the **DataRow**.
5. If there are output parameters, they are placed in the **DataRow**.
6. The `OnRowUpdated` event is raised.
7. `AcceptChanges` is called.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SelectCommand">
<MemberSignature Language="C#" Value="public System.Data.OracleClient.OracleCommand SelectCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.OracleClient.OracleCommand SelectCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.SelectCommand" />
<MemberSignature Language="VB.NET" Value="Public Property SelectCommand As OracleCommand" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::OracleClient::OracleCommand ^ SelectCommand { System::Data::OracleClient::OracleCommand ^ get(); void set(System::Data::OracleClient::OracleCommand ^ value); };" />
<MemberSignature Language="F#" Value="member this.SelectCommand : System.Data.OracleClient.OracleCommand with get, set" Usage="System.Data.OracleClient.OracleDataAdapter.SelectCommand" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an SQL statement or stored procedure used to select records in the database.</summary>
<value>An <see cref="T:System.Data.OracleClient.OracleCommand" /> that is used during a fill operation to select records from database for placement in the <see cref="T:System.Data.DataSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> is assigned to a previously created <xref:System.Data.OracleClient.OracleCommand>, the <xref:System.Data.OracleClient.OracleCommand> is not cloned. Instead, the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> maintains a reference to the previously created <xref:System.Data.OracleClient.OracleCommand> object.
If <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> does not return any rows, no tables are added to the **DataSet**, and no exception is raised.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> and <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> properties. It assumes you have already created an <xref:System.Data.OracleClient.OracleConnection> object.
```vb
Public Shared Function CreateCustomerAdapter(conn As OracleConnection) As OracleDataAdapter
Dim da As OracleDataAdapter = New OracleDataAdapter()
Dim cmd As OracleCommand
' Create the SelectCommand.
cmd = New OracleCommand("SELECT * FROM Dept " & _
"WHERE DName = :pDName AND Loc = :pLoc", conn)
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14)
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13)
da.SelectCommand = cmd
' Create the InsertCommand.
cmd = New OracleCommand("INSERT INTO Dept (DeptNo, DName) " & _
"VALUES (pDeptNo, pDName)", conn)
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName")
da.InsertCommand = cmd
Return da
End Function
```
```csharp
public static OracleDataAdapter CreateCustomerAdapter(OracleConnection conn)
{
OracleDataAdapter da = new OracleDataAdapter();
OracleCommand cmd;
// Create the SelectCommand.
cmd = new OracleCommand("SELECT * FROM Dept " +
"WHERE DName = :pDName AND Loc = :pLoc", conn);
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14);
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13);
da.SelectCommand = cmd;
// Create the InsertCommand.
cmd = new OracleCommand("INSERT INTO Dept (DeptNo, DName) " +
"VALUES (:pDeptNo, :pDName)", conn);
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName");
da.InsertCommand = cmd;
return da;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.DeleteCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.System#Data#IDbDataAdapter#DeleteCommand" />
<MemberSignature Language="VB.NET" Value=" Property DeleteCommand As IDbCommand Implements IDbDataAdapter.DeleteCommand" />
<MemberSignature Language="C++ CLI" Value="property System::Data::IDbCommand ^ System::Data::IDbDataAdapter::DeleteCommand { System::Data::IDbCommand ^ get(); void set(System::Data::IDbCommand ^ value); };" />
<MemberSignature Language="F#" Usage="System.Data.IDbDataAdapter.DeleteCommand" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Data.IDbDataAdapter.DeleteCommand</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Data.IDbDataAdapter.DeleteCommand" />.</summary>
<value>A string representing the command.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Data.OracleClient.OracleDataAdapter> instance is cast to an <xref:System.Data.IDbDataAdapter> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.InsertCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.System#Data#IDbDataAdapter#InsertCommand" />
<MemberSignature Language="VB.NET" Value=" Property InsertCommand As IDbCommand Implements IDbDataAdapter.InsertCommand" />
<MemberSignature Language="C++ CLI" Value="property System::Data::IDbCommand ^ System::Data::IDbDataAdapter::InsertCommand { System::Data::IDbCommand ^ get(); void set(System::Data::IDbCommand ^ value); };" />
<MemberSignature Language="F#" Usage="System.Data.IDbDataAdapter.InsertCommand" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Data.IDbDataAdapter.InsertCommand</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Data.IDbDataAdapter.InsertCommand" />.</summary>
<value>A string representing the command.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Data.OracleClient.OracleDataAdapter> instance is cast to an <xref:System.Data.IDbDataAdapter> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.SelectCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.System#Data#IDbDataAdapter#SelectCommand" />
<MemberSignature Language="VB.NET" Value=" Property SelectCommand As IDbCommand Implements IDbDataAdapter.SelectCommand" />
<MemberSignature Language="C++ CLI" Value="property System::Data::IDbCommand ^ System::Data::IDbDataAdapter::SelectCommand { System::Data::IDbCommand ^ get(); void set(System::Data::IDbCommand ^ value); };" />
<MemberSignature Language="F#" Usage="System.Data.IDbDataAdapter.SelectCommand" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Data.IDbDataAdapter.SelectCommand</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />.</summary>
<value>A string representing the command.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Data.OracleClient.OracleDataAdapter> instance is cast to an <xref:System.Data.IDbDataAdapter> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.UpdateCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.System#Data#IDbDataAdapter#UpdateCommand" />
<MemberSignature Language="VB.NET" Value=" Property UpdateCommand As IDbCommand Implements IDbDataAdapter.UpdateCommand" />
<MemberSignature Language="C++ CLI" Value="property System::Data::IDbCommand ^ System::Data::IDbDataAdapter::UpdateCommand { System::Data::IDbCommand ^ get(); void set(System::Data::IDbCommand ^ value); };" />
<MemberSignature Language="F#" Usage="System.Data.IDbDataAdapter.UpdateCommand" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Data.IDbDataAdapter.UpdateCommand</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Data.IDbDataAdapter.UpdateCommand" />.</summary>
<value>A string representing the command.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Data.OracleClient.OracleDataAdapter> instance is cast to an <xref:System.Data.IDbDataAdapter> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.ICloneable.Clone">
<MemberSignature Language="C#" Value="object ICloneable.Clone ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance object System.ICloneable.Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.System#ICloneable#Clone" />
<MemberSignature Language="VB.NET" Value="Function Clone () As Object Implements ICloneable.Clone" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Object ^ System.ICloneable.Clone() = ICloneable::Clone;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ICloneable.Clone</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>For a description of this member, see <see cref="M:System.ICloneable.Clone" />.</summary>
<returns>A new object that is a copy of this instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Data.OracleClient.OracleDataAdapter> instance is cast to an <xref:System.ICloneable> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TerminateBatching">
<MemberSignature Language="C#" Value="protected override void TerminateBatching ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void TerminateBatching() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.OracleClient.OracleDataAdapter.TerminateBatching" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub TerminateBatching ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void TerminateBatching();" />
<MemberSignature Language="F#" Value="override this.TerminateBatching : unit -&gt; unit" Usage="oracleDataAdapter.TerminateBatching " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UpdateBatchSize">
<MemberSignature Language="C#" Value="public override int UpdateBatchSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 UpdateBatchSize" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.UpdateBatchSize" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property UpdateBatchSize As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int UpdateBatchSize { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.UpdateBatchSize : int with get, set" Usage="System.Data.OracleClient.OracleDataAdapter.UpdateBatchSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>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.</summary>
<value>The number of rows to process per batch.
<list type="table"><listheader><term> Value:
</term><description> Effect:
</description></listheader><item><term> 0
</term><description> There is no limit on the batch size.
</description></item><item><term> 1
</term><description> Disables batch updating.
</description></item><item><term> &gt; 1
</term><description> Changes are sent using batches of <see cref="P:System.Data.OracleClient.OracleDataAdapter.UpdateBatchSize" /> operations at a time.
</description></item></list>
When setting this to a value other than 1 all the commands associated with the <see cref="T:System.Data.OracleClient.OracleDataAdapter" /> have to have their <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property set to <see langword="None" /> or <see langword="OutputParameters" />. An exception is thrown otherwise.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Data.OracleClient.OracleDataAdapter.UpdateBatchSize%2A> property to update a data source with changes from a <xref:System.Data.DataSet>. This can increase application performance by reducing the number of round-trips to the server.
Executing an extremely large batch could decrease performance. Therefore, you should test for the optimum batch size setting before you implement your application.
An <xref:System.ArgumentOutOfRangeException> is thrown if the value is set to a number less than zero.
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
<Member MemberName="UpdateCommand">
<MemberSignature Language="C#" Value="public System.Data.OracleClient.OracleCommand UpdateCommand { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.OracleClient.OracleCommand UpdateCommand" />
<MemberSignature Language="DocId" Value="P:System.Data.OracleClient.OracleDataAdapter.UpdateCommand" />
<MemberSignature Language="VB.NET" Value="Public Property UpdateCommand As OracleCommand" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Data::OracleClient::OracleCommand ^ UpdateCommand { System::Data::OracleClient::OracleCommand ^ get(); void set(System::Data::OracleClient::OracleCommand ^ value); };" />
<MemberSignature Language="F#" Value="member this.UpdateCommand : System.Data.OracleClient.OracleCommand with get, set" Usage="System.Data.OracleClient.OracleDataAdapter.UpdateCommand" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.OracleClient</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.OracleClient.OracleCommand</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an SQL statement or stored procedure used to update records in the database.</summary>
<value>An <see cref="T:System.Data.OracleClient.OracleCommand" /> used during an update operation to update records in the database that correspond to modified rows in the <see cref="T:System.Data.DataSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When <xref:System.Data.OracleClient.OracleDataAdapter.UpdateCommand%2A> is assigned to a previously created <xref:System.Data.OracleClient.OracleCommand>, the <xref:System.Data.OracleClient.OracleCommand> is not cloned. Instead, the <xref:System.Data.OracleClient.OracleDataAdapter.UpdateCommand%2A> maintains a reference to the previously created <xref:System.Data.OracleClient.OracleCommand> object.
During an update operation, if <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A> is not set and primary key information is present in the **DataSet**, you can use the <xref:System.Data.OracleClient.OracleCommandBuilder> class to automatically generate <xref:System.Data.OracleClient.OracleDataAdapter.InsertCommand%2A>, and additional commands needed to reconcile the <xref:System.Data.DataSet> to the database. To do this, set the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> property of the <xref:System.Data.OracleClient.OracleDataAdapter>. The generation logic also requires key column information to be present in the <xref:System.Data.DataSet>. For more information see [Generating Commands with CommandBuilders](~/docs/framework/data/adonet/generating-commands-with-commandbuilders.md).
> [!NOTE]
> If execution of this command returns rows, these rows may be merged with the <xref:System.Data.DataSet> depending upon how you set the <xref:System.Data.OracleClient.OracleCommand.UpdatedRowSource%2A> property of the <xref:System.Data.OracleClient.OracleCommand> object.
When you update a column with the `LONG RAW` data type, an exception is thrown when you enter a value of `NULL` in the column. The Oracle `LONG RAW` data type is a deprecated type in Oracle version 8.0. To avoid this error, use the `BLOB` data type instead of `LONG RAW`.
## Examples
The following example creates an <xref:System.Data.OracleClient.OracleDataAdapter> and sets the <xref:System.Data.OracleClient.OracleDataAdapter.SelectCommand%2A> and <xref:System.Data.OracleClient.OracleDataAdapter.UpdateCommand%2A> properties. It assumes you have already created an <xref:System.Data.OracleClient.OracleConnection> object.
```vb
Public Shared Function CreateCustomerAdapter(conn As OracleConnection) As OracleDataAdapter
Dim da As OracleDataAdapter = New OracleDataAdapter()
Dim cmd As OracleCommand
Dim parm As OracleParameter
' Create the SelectCommand.
cmd = New OracleCommand("SELECT * FROM Dept " & _
"WHERE DName = pDName AND Loc = pLoc", conn)
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14)
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13)
da.SelectCommand = cmd
' Create the UpdateCommand.
cmd = New OracleCommand("UPDATE Dept SET DeptNo = pDeptNo, DName = pDName " & _
"WHERE DeptNo = poldDeptNo", conn)
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName")
parm = cmd.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo")
parm.SourceVersion = DataRowVersion.Original
da.UpdateCommand = cmd
Return da
End Function
```
```csharp
public static OracleDataAdapter CreateCustomerAdapter(OracleConnection conn)
{
OracleDataAdapter da = new OracleDataAdapter();
OracleCommand cmd;
OracleParameter parm;
// Create the SelectCommand.
cmd = new OracleCommand("SELECT * FROM Dept " +
"WHERE DName = pDName AND Loc = pLoc", conn);
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14);
cmd.Parameters.Add("pLoc", OracleType.NVarChar, 13);
da.SelectCommand = cmd;
// Create the UpdateCommand.
cmd = new OracleCommand("UPDATE Dept SET DeptNo = pDeptNo, DName = pDName " +
"WHERE DeptNo = poldDeptNo", conn);
cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo");
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName");
parm = cmd.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo");
parm.SourceVersion = DataRowVersion.Original;
da.UpdateCommand = cmd;
return da;
}
```
]]></format>
</remarks>
<related type="Article" href="~/docs/framework/data/adonet/retrieving-and-modifying-data.md">Retrieving and Modifying Data in ADO.NET</related>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.