asp.net.ph

OleDbParameter.SourceVersion Property

System.Data.OleDb Namespace   OleDbParameter Class


Sets or retrieves the DataRowVersion used for the parameter value.

Syntax


Script OleDbParameter.SourceColumn [ = enumValue ]

Property Value


enumValue One of the DataRowVersion values.

The property is read/write with a default value of Current.

Implements

IDataParameter.SourceVersion

Exceptions


Exception Type Condition
ArgumentException The property was not set to a valid DataRowVersion.

Remarks

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.

Example

The following example initializes an OleDbParameter and sets some of its properties.

public void CreateOleDbParameter ( ) {
   OleDbParameter myParam = new OleDbParameter ( "Description", OleDbType.VarChar, 100 );
   myParam.SourceColumn = "Description";
   myParam.SourceVersion = DataRowVersion.Current;
}
  C# VB

See Also

OleDbParameter Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph