This documentation is archived and is not being maintained.

OracleParameter Constructor (String, OracleType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

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

Initializes a new instance of the OracleParameter class with the parameter name, data type, length, source column name, parameter direction, numeric precision, and other properties.

[Visual Basic]
Public Sub New( _
   ByVal name As String, _
   ByVal oracleType As OracleType, _
   ByVal size As Integer, _
   ByVal direction As ParameterDirection, _
   ByVal isNullable As Boolean, _
   ByVal precision As Byte, _
   ByVal scale As Byte, _
   ByVal srcColumn As String, _
   ByVal srcVersion As DataRowVersion, _
   ByVal value As Object _
)
[C#]
public OracleParameter(
   string name,
 OracleType oracleType,
 int size,
 ParameterDirection direction,
 bool isNullable,
 byte precision,
 byte scale,
 string srcColumn,
 DataRowVersion srcVersion,
 object value
);
[C++]
public: OracleParameter(
   String* name,
 OracleType oracleType,
 int size,
 ParameterDirection direction,
 bool isNullable,
 unsigned char precision,
 unsigned char scale,
 String* srcColumn,
 DataRowVersion srcVersion,
 Object* value
);
[JScript]
public function OracleParameter(
   name : String,
 oracleType : OracleType,
 size : int,
 direction : ParameterDirection,
 isNullable : Boolean,
 precision : Byte,
 scale : Byte,
 srcColumn : String,
 srcVersion : DataRowVersion,
 value : Object
);

Parameters

name
The name of the parameter.
oracleType
One of the OracleType values.
size
The length of the parameter.
direction
One of the System.Data.ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to the left and right of the decimal point to which Value is resolved.
scale
The total number of decimal places to which Value is resolved.
srcColumn
The name of the source column.
srcVersion
One of the System.Data.DataRowVersion values.
value
An Object that is the value of the OracleParameter.

Exceptions

Exception Type Condition
ArgumentException The value supplied in the oracleType parameter is an invalid back-end data type.

Example

[Visual Basic, C#, C++] The following example creates an OracleParameter and displays the ParameterName.

[Visual Basic] 
Public Sub CreateOracleParameter()
    Dim myParameter As New OracleParameter("DName", OracleType.VarChar, 11, ParameterDirection.Output, True, 0, 0, "DName", DataRowVersion.Current, "ENGINEERING")
    MessageBox.Show(myParameter.ToString())
End Sub 'CreateOracleParameter

[C#] 
public void CreateOracleParameter() 
 {
    OracleParameter myParameter = new OracleParameter("DName",OracleType.VarChar,
                11,ParameterDirection.Output,true,0,0,"DName",
                DataRowVersion.Current,"ENGINEERING");
    MessageBox.Show(myParameter.ToString());
 }

[C++] 
public:
void CreateOracleParameter() 
 {
    OracleParameter* myParameter = new OracleParameter(S"DName",OracleType::VarChar,
                11,ParameterDirection::Output,true,0,0,S"DName",
                DataRowVersion::Current,S"ENGINEERING");
    MessageBox::Show(myParameter->ToString());
 }

[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 | OracleParameter Constructor Overload List

Show: