Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

OracleParameter.SourceVersion Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets or sets the System.Data.DataRowVersion to use when loading Value.

[Visual Basic]
Public Overridable Property SourceVersion As DataRowVersion  _
   Implements IDataParameter.SourceVersion
[C#]
public virtual DataRowVersion SourceVersion {get; set;}
[C++]
public: __property virtual DataRowVersion get_SourceVersion();
public: __property virtual void set_SourceVersion(DataRowVersion);
[JScript]
public function get SourceVersion() : DataRowVersion;
public function set SourceVersion(DataRowVersion);

Property Value

One of the System.Data.DataRowVersion values. The default is Current.

Implements

IDataParameter.SourceVersion

Exceptions

Exception Type Condition
ArgumentException The property was not set to one of the DataRowVersion values.

Remarks

The SourceVersion is used by UpdateCommand during an Update operation to determine whether the parameter value is set to Current or Original. This allows primary keys to be updated.

This property is set to the version of the DataRow used by either the Item property (DataRow indexer), or the GetChildRows method of the DataRow object.

Example

[Visual Basic, C#, C++] The following example creates an OracleParameter and sets some of its properties.

[Visual Basic] 
Public Sub CreateOracleParameter()
    Dim myParameter As New OracleParameter("pDName", OracleType.VarChar)
    myParameter.IsNullable = True
    myParameter.SourceColumn = "Description"
    myParameter.SourceVersion = DataRowVersion.Current
    myParameter.Direction = ParameterDirection.Output
End Sub 'CreateOracleParameter

[C#] 
public void CreateOracleParameter() 
 {
    OracleParameter myParameter = new OracleParameter("pDName", OracleType.VarChar);
    myParameter.IsNullable = true;
    myParameter.SourceColumn = "Description";
    myParameter.SourceVersion = DataRowVersion.Current;
    myParameter.Direction = ParameterDirection.Output;
 }

[C++] 
public:
void CreateOracleParameter() 
 {
    OracleParameter* myParameter = new OracleParameter(S"pDName", OracleType::VarChar);
    myParameter->IsNullable = true;
    myParameter->SourceColumn = S"Description";
    myParameter->SourceVersion = DataRowVersion::Current;
    myParameter->Direction = ParameterDirection::Output;
 }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

OracleParameter Class | OracleParameter Members | System.Data.OracleClient Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.