OracleRowUpdatedEventArgsとは? わかりやすく解説

OracleRowUpdatedEventArgs クラス

RowUpdated イベントデータ提供します。このクラス継承できません。

名前空間: System.Data.OracleClient
アセンブリ: System.Data.OracleClient (system.data.oracleclient.dll 内)
構文構文

Public NotInheritable Class
 OracleRowUpdatedEventArgs
    Inherits RowUpdatedEventArgs
Dim instance As OracleRowUpdatedEventArgs
public sealed class OracleRowUpdatedEventArgs
 : RowUpdatedEventArgs
public ref class OracleRowUpdatedEventArgs
 sealed : public RowUpdatedEventArgs
public final class OracleRowUpdatedEventArgs
 extends RowUpdatedEventArgs
public final class OracleRowUpdatedEventArgs
 extends RowUpdatedEventArgs
解説解説
使用例使用例

RowUpdating イベントRowUpdated イベント使用する方法次の例に示します

RowUpdating イベントは、次の出力返します

Event Arguments: (command=OracleCommand commandType=2status=0)

RowUpdated イベントは、次の出力返します

Event Arguments: (command= OracleCommend commandType=2 recordsAffected=1 row=System.Data.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)
        Dim cb As OracleCommandBuilder = New
 OracleCommandBuilder(rAdapter)
        
        '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
End Class 'Form1
// 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);
    OracleCommandBuilder cb = new OracleCommandBuilder(rAdapter);
 
    //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.Object
   System.EventArgs
     System.Data.Common.RowUpdatedEventArgs
      System.Data.OracleClient.OracleRowUpdatedEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OracleRowUpdatedEventArgs メンバ
System.Data.OracleClient 名前空間

OracleRowUpdatedEventArgs コンストラクタ

OracleRowUpdatedEventArgs クラス新しインスタンス初期化します。

名前空間: System.Data.OracleClient
アセンブリ: 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 OracleRowUpdatedEventArgs(row,
 command, statementType, tableMapping)
public OracleRowUpdatedEventArgs (
    DataRow row,
    IDbCommand command,
    StatementType statementType,
    DataTableMapping tableMapping
)
public:
OracleRowUpdatedEventArgs (
    DataRow^ row, 
    IDbCommand^ command, 
    StatementType statementType, 
    DataTableMapping^ tableMapping
)
public OracleRowUpdatedEventArgs (
    DataRow row, 
    IDbCommand command, 
    StatementType statementType, 
    DataTableMapping tableMapping
)
public function OracleRowUpdatedEventArgs (
    row : DataRow, 
    command : IDbCommand, 
    statementType : StatementType, 
    tableMapping : DataTableMapping
)

パラメータ

row

Update通じて送信された DataRow。

command

Update呼び出し時に実行される IDbCommand。

statementType

実行されクエリ種類指定する StatementType 値の 1 つ

tableMapping

Update通じて送信された DataTableMapping。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OracleRowUpdatedEventArgs クラス
OracleRowUpdatedEventArgs メンバ
System.Data.OracleClient 名前空間

OracleRowUpdatedEventArgs プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Command Update呼び出し時に実行される OracleCommand を取得または設定します
パブリック プロパティ Errors  Command実行時.NET Framework データ プロバイダ生成したエラー取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ RecordsAffected  SQL ステートメントによって変更挿入、または削除された行の数を取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ Row  Update通じて送信された DataRow を取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ RowCount  バッチでの更新済みレコード処理された行数を取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ StatementType  実行されSQL ステートメント種類取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ Status  Command プロパティの UpdateStatus を取得します。 ( RowUpdatedEventArgs から継承されます。)
パブリック プロパティ TableMapping  Update通じて送信された DataTableMapping を取得します。 ( RowUpdatedEventArgs から継承されます。)
参照参照

関連項目

OracleRowUpdatedEventArgs クラス
System.Data.OracleClient 名前空間

OracleRowUpdatedEventArgs メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

OracleRowUpdatedEventArgs クラス
System.Data.OracleClient 名前空間

OracleRowUpdatedEventArgs メンバ

RowUpdated イベントデータ提供します。このクラス継承できません。

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド OracleRowUpdatedEventArgs OracleRowUpdatedEventArgs クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Command Update呼び出し時に実行される OracleCommand を取得または設定します
パブリック プロパティ Errors  Command実行時.NET Framework データ プロバイダ生成したエラー取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ RecordsAffected  SQL ステートメントによって変更挿入、または削除された行の数を取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ Row  Update通じて送信された DataRow を取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ RowCount  バッチでの更新済みレコード処理された行数を取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ StatementType  実行されSQL ステートメント種類取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ Status  Command プロパティの UpdateStatus を取得します。(RowUpdatedEventArgs から継承されます。)
パブリック プロパティ TableMapping  Update通じて送信された DataTableMapping を取得します。(RowUpdatedEventArgs から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

OracleRowUpdatedEventArgs クラス
System.Data.OracleClient 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からOracleRowUpdatedEventArgsを検索した結果を表示しています。
Weblioに収録されているすべての辞書からOracleRowUpdatedEventArgsを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からOracleRowUpdatedEventArgs を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「OracleRowUpdatedEventArgs」の関連用語

OracleRowUpdatedEventArgsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



OracleRowUpdatedEventArgsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS