OracleRowUpdatingEventArgs クラス
アセンブリ: System.Data.OracleClient (system.data.oracleclient.dll 内)



RowUpdating イベントと RowUpdated イベントを使用する方法を次の例に示します。
Event Arguments: (command=OracleCommand commandType=2 status=0)
Event Arguments: (command=OracleCommand commandType=2 recordsAffected=1 row=DataRow[37] status=0)
'Handler for RowUpdating event. Private Shared Sub OnRowUpdating(sender As Object, e As OracleRowUpdatingEventArgs) PrintEventArgs(e) End Sub 'OnRowUpdating 'Handler for RowUpdated event. Private Shared Sub OnRowUpdated(sender As Object, e As OracleRowUpdatedEventArgs) PrintEventArgs(e) End Sub 'OnRowUpdated 'Entry point which delegates to C-style main Private Function. Public Overloads Shared Sub Main() System.Environment.ExitCode = Main(System.Environment.GetCommandLineArgs()) End Sub Overloads Public Shared Function Main(args() As String) As Integer Const CONNECTION_STRING As String = "Data Source=Oracle8i;Integrated Security=yes" Const SELECT_ALL As String = "SELECT * FROM Scott.Emp" 'Create DataAdapter. Dim rAdapter As New OracleDataAdapter(SELECT_ALL, CONNECTION_STRING) 'Create and fill DataSet (Select only first 5 rows.). Dim rDataSet As New DataSet() rAdapter.Fill(rDataSet, 0, 5, "Table") 'Modify DataSet. Dim rTable As DataTable = rDataSet.Tables("Table") rTable.Rows(0)(1) = "DYZY" 'Add handlers. AddHandler rAdapter.RowUpdating, AddressOf OnRowUpdating AddHandler rAdapter.RowUpdated, AddressOf OnRowUpdated 'Update--this operation fires two events (RowUpdating and RowUpdated) for each changed row. rAdapter.Update(rDataSet, "Table") 'Remove handlers. RemoveHandler rAdapter.RowUpdating, AddressOf OnRowUpdating RemoveHandler rAdapter.RowUpdated, AddressOf OnRowUpdated Return 0 End Function 'Main Overloads Private Shared Sub PrintEventArgs(args As OracleRowUpdatingEventArgs) Console.WriteLine("OnRowUpdating") Console.WriteLine(" event args: (" & _ " command=" & _ args.Command.CommandText & _ " commandType=" & _ args.StatementType & _ " status=" & _ args.Status & _ ")") End Sub 'PrintEventArgs Overloads Private Shared Sub PrintEventArgs(args As OracleRowUpdatedEventArgs) Console.WriteLine("OnRowUpdated") Console.WriteLine(" event args: (" & _ " command=" & _ args.Command.CommandText & _ " commandType=" & _ args.StatementType & _ " recordsAffected=" & _ args.RecordsAffected & _ " status=" & _ args.Status & _ ")") End Sub 'PrintEventArgs
// handler for RowUpdating event private static void OnRowUpdating(object sender, OracleRowUpdatingEventArgs e) { PrintEventArgs(e); } //Handler for RowUpdated event. private static void OnRowUpdated(object sender, OracleRowUpdatedEventArgs e) { PrintEventArgs(e); } public static int Main(String[] args) { const string CONNECTION_STRING = "Data Source=Oracle8i;Integrated Security=yes"; const string SELECT_ALL = "SELECT * FROM Scott.Emp"; //Create DataAdapter. OracleDataAdapter rAdapter = new OracleDataAdapter(SELECT_ALL, CONNECTION_STRING); //Create and fill DataSet (Select only first 5 rows.). DataSet rDataSet = new DataSet(); rAdapter.Fill(rDataSet, 0, 5, "Table"); //Modify DataSet. DataTable rTable = rDataSet.Tables["Table"]; rTable.Rows[0][1] = "DYZY"; //Add handlers. rAdapter.RowUpdating += new OracleRowUpdatingEventHandler( OnRowUpdating ); rAdapter.RowUpdated += new OracleRowUpdatedEventHandler( OnRowUpdated ); //Update--this operation fires two events (RowUpdating and RowUpdated) for each changed row. rAdapter.Update(rDataSet, "Table"); //Remove handlers. rAdapter.RowUpdating -= new OracleRowUpdatingEventHandler( OnRowUpdating ); rAdapter.RowUpdated -= new OracleRowUpdatedEventHandler( OnRowUpdated ); return 0; } private static void PrintEventArgs(OracleRowUpdatingEventArgs args) { Console.WriteLine("OnRowUpdating"); Console.WriteLine(" event args: ("+ " command=" + args.Command + " commandType=" + args.StatementType + " status=" + args.Status + ")"); } private static void PrintEventArgs(OracleRowUpdatedEventArgs args) { Console.WriteLine("OnRowUpdated"); Console.WriteLine(" event args: ("+ " command=" + args.Command + " commandType=" + args.StatementType + " recordsAffected=" + args.RecordsAffected + " status=" + args.Status + ")"); }

System.EventArgs
System.Data.Common.RowUpdatingEventArgs
System.Data.OracleClient.OracleRowUpdatingEventArgs


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OracleRowUpdatingEventArgs コンストラクタ
アセンブリ: System.Data.OracleClient (system.data.oracleclient.dll 内)

Public Sub New ( _ row As DataRow, _ command As IDbCommand, _ statementType As StatementType, _ tableMapping As DataTableMapping _ )
Dim row As DataRow Dim command As IDbCommand Dim statementType As StatementType Dim tableMapping As DataTableMapping Dim instance As New OracleRowUpdatingEventArgs(row, command, statementType, tableMapping)
public OracleRowUpdatingEventArgs ( DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping )
public: OracleRowUpdatingEventArgs ( DataRow^ row, IDbCommand^ command, StatementType statementType, DataTableMapping^ tableMapping )
public OracleRowUpdatingEventArgs ( DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping )
public function OracleRowUpdatingEventArgs ( row : DataRow, command : IDbCommand, statementType : StatementType, tableMapping : DataTableMapping )

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OracleRowUpdatingEventArgs プロパティ

名前 | 説明 | |
---|---|---|
![]() | Command | Update の実行時に実行する OracleCommand を取得または設定します。 |
![]() | Errors | Command の実行時に .NET Framework データ プロバイダが生成したエラーを取得します。 ( RowUpdatingEventArgs から継承されます。) |
![]() | Row | 挿入、更新、または削除操作の一部としてサーバーに送信される DataRow を取得します。 ( RowUpdatingEventArgs から継承されます。) |
![]() | StatementType | 実行する SQL ステートメントの種類を取得します。 ( RowUpdatingEventArgs から継承されます。) |
![]() | Status | Command プロパティの UpdateStatus を取得または設定します。 ( RowUpdatingEventArgs から継承されます。) |
![]() | TableMapping | Update を通じて送信する DataTableMapping を取得します。 ( RowUpdatingEventArgs から継承されます。) |


OracleRowUpdatingEventArgs メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

OracleRowUpdatingEventArgs メンバ
OracleRowUpdatingEventArgs データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Command | Update の実行時に実行する OracleCommand を取得または設定します。 |
![]() | Errors | Command の実行時に .NET Framework データ プロバイダが生成したエラーを取得します。(RowUpdatingEventArgs から継承されます。) |
![]() | Row | 挿入、更新、または削除操作の一部としてサーバーに送信される DataRow を取得します。(RowUpdatingEventArgs から継承されます。) |
![]() | StatementType | 実行する SQL ステートメントの種類を取得します。(RowUpdatingEventArgs から継承されます。) |
![]() | Status | Command プロパティの UpdateStatus を取得または設定します。(RowUpdatingEventArgs から継承されます。) |
![]() | TableMapping | Update を通じて送信する DataTableMapping を取得します。(RowUpdatingEventArgs から継承されます。) |


名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- OracleRowUpdatingEventArgsのページへのリンク