System.Data.SqlClient Namespace SqlParameter Class
Sets or retrieves the DataRowVersion used for the parameter value.
Script |
SqlParameter.SourceColumn [ = enumValue ] |
The property is read/write with a default value of Current.
IDataParameter.SourceVersion
The SourceVersion property is used by UpdateCommand during Update to determine whether the original or current value is used for the parameter value. This allows primary keys to be updated. This property is ignored by InsertCommand and DeleteCommand. This property is set to the version of the DataRow used by the Item property, or the GetChildRows method of the DataRow object.
The following example initializes an SqlParameter and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar, 100 );
myParam.SourceColumn = "Description";
myParam.SourceVersion = DataRowVersion.Current;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( "@Description", SqlDbType.VarChar, 100 )
myParam.SourceColumn = "Description"
myParam.SourceVersion = DataRowVersion.Current
End Sub |
|
C# |
VB |
SqlParameter Members