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

OracleRowUpdatingEventArgs クラス

RowUpdating イベントデータ提供します

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

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

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

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

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

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

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.Object
   System.EventArgs
     System.Data.Common.RowUpdatingEventArgs
      System.Data.OracleClient.OracleRowUpdatingEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OracleRowUpdatingEventArgs メンバ
System.Data.OracleClient 名前空間

OracleRowUpdatingEventArgs コンストラクタ

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

名前空間: 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 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
)

パラメータ

row

更新する DataRow。

command

更新中に実行する IDbCommand。

statementType

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

tableMapping

更新通じて送信された DataTableMapping。

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

OracleRowUpdatingEventArgs プロパティ


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

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

関連項目

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

OracleRowUpdatingEventArgs メソッド


OracleRowUpdatingEventArgs メンバ

RowUpdating イベントデータ提供します

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド OracleRowUpdatingEventArgs OracleRowUpdatingEventArgs クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Command Update実行時実行する OracleCommand を取得または設定します
パブリック プロパティ Errors  Command実行時.NET Framework データ プロバイダ生成したエラー取得します。(RowUpdatingEventArgs から継承されます。)
パブリック プロパティ Row  挿入更新、または削除操作一部としてサーバー送信される DataRow を取得します。(RowUpdatingEventArgs から継承されます。)
パブリック プロパティ StatementType  実行する SQL ステートメント種類取得します。(RowUpdatingEventArgs から継承されます。)
パブリック プロパティ Status  Command プロパティの UpdateStatus を取得または設定します。(RowUpdatingEventArgs から継承されます。)
パブリック プロパティ TableMapping  Update通じて送信する DataTableMapping を取得します。(RowUpdatingEventArgs から継承されます。)
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ BaseCommand  このクラスインスタンスの IDbCommand オブジェクト取得または設定します。(RowUpdatingEventArgs から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

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



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

辞書ショートカット

すべての辞書の索引

「OracleRowUpdatingEventArgs」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS