DB2Parameter Constructor (String, DB2Type)
Initializes a new instance of the DB2Parameter class with the parameter name and data type.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[Visual Basic]
Public Sub New( _
ByVal name As String, _
ByVal type As DB2Type
_
)
[C#]
public DB2Parameter(
string name,
DB2Type
type
);
[C++]
public: DB2Parameter(
String* name,
DB2Type
type
);
[JScript]
public function DB2Parameter(
name : String,
type : DB2Type
);
Parameters
- name
- The name of the parameter.
- type
- One of the DB2®Type enumeration values.
Example
[Visual Basic, C#] The following example creates a DB2Parameter and sets some of its properties.
[Visual Basic]
Public Sub CreateDB2Parameter()
Dim myParameter As New DB2Parameter("Description", DB2Type.VarChar)
myParameter.Direction = ParameterDirection.Output
myParameter.Size = 88
End Sub 'CreateDB2Parameter
[C#]
public void CreateDB2Parameter()
{
DB2Parameter myParameter = new DB2Parameter("Description",DB2Type.VarChar);
myParameter.Direction = ParameterDirection.Output;
myParameter.Size = 88;
}