IDataParameter.SourceVersion プロパティ
アセンブリ: System.Data (system.data.dll 内)

Property SourceVersion As DataRowVersion
Dim instance As IDataParameter Dim value As DataRowVersion value = instance.SourceVersion instance.SourceVersion = value
/** @property */ DataRowVersion get_SourceVersion () /** @property */ void set_SourceVersion (DataRowVersion value)
DataRowVersion 値の 1 つ。既定値は Current です。


Update 操作中に、UpdateCommand は、このプロパティを使用して、パラメータ値が元の値と現在の値のどちらに設定されているかを判断します。これにより、主キーを更新できます。このプロパティは InsertCommand と DeleteCommand では無視されます。このプロパティは、Item プロパティ、または DataRow オブジェクトの GetChildRows メソッドが使用する、DataRow のバージョンに設定されます。

実装クラスのインスタンス、SqlParameter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Sub CreateSqlParameter() Dim parameter As New SqlParameter( _ "@Description", SqlDbType.VarChar) parameter.IsNullable = True parameter.SourceColumn = "Description" parameter.SourceVersion = DataRowVersion.Current parameter.Direction = ParameterDirection.Output End Sub
public void CreateSqlParameter() { SqlParameter parameter = new SqlParameter( "@Description", SqlDbType.VarChar); parameter.IsNullable = true; parameter.SourceColumn = "Description"; parameter.SourceVersion = DataRowVersion.Current; parameter.Direction = ParameterDirection.Output; }

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


- IDataParameter.SourceVersion プロパティのページへのリンク