This documentation is archived and is not being maintained.

OracleParameter Constructor (String, OracleType)

.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 and data type.

[Visual Basic]
Public Sub New( _
   ByVal name As String, _
   ByVal oracleType As OracleType _
)
[C#]
public OracleParameter(
   string name,
 OracleType oracleType
);
[C++]
public: OracleParameter(
   String* name,
 OracleType oracleType
);
[JScript]
public function OracleParameter(
   name : String,
 oracleType : OracleType
);

Parameters

name
The name of the parameter.
oracleType
One of the OracleType values.

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 sets some of its properties.

[Visual Basic] 
Public Sub CreateOracleParameter()
    Dim myParameter As New OracleParameter("DName", OracleType.VarChar)
    myParameter.Direction = ParameterDirection.Output
    myParameter.Size = 14
End Sub 'CreateOracleParameter

[C#] 

 public void CreateOracleParameter() 
 {
    OracleParameter myParameter = new OracleParameter("DName",OracleType.VarChar);
    myParameter.Direction = ParameterDirection.Output;
    myParameter.Size = 14;
 }

[C++] 

public:
 void CreateOracleParameter() 
 {
    OracleParameter* myParameter = new OracleParameter(S"DName",OracleType::VarChar);
    myParameter->Direction = ParameterDirection::Output;
    myParameter->Size = 14;
 }

[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: