DB2Parameter Constructor
Initializes a new instance of the DB2Parameter class.
Public Constructors
Name | Description |
---|---|
DB2®Parameter() | Initializes a new instance of the DB2Parameter class. |
DB2Parameter(String, Object) | Initializes a new instance of the DB2Parameter class with the parameter name and an object holding a value to be passed as a parameter (for example, another DB2Parameter instance, or instances of IBM.Data.DB2Types structures or classes). |
DB2Parameter(String, DB2Type) | Initializes a new instance of the DB2Parameter class with the parameter name and data type. |
DB2Parameter(String, DB2Type, Integer) | Initializes a new instance of the DB2Parameter class with the parameter name, data type, and width. |
DB2Parameter(String, DB2Type, Integer, String) | Initializes a new instance of the DB2Parameter class with the parameter name, data type, width, and source column name. |
DB2Parameter(String, DB2Type, Integer, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object) | Initializes a new instance of the DB2Parameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties. |
Example
[Visual Basic, C#] The following example creates a DB2Parameter and displays the ParameterName.
[Visual Basic]
Public Sub CreateDB2Parameter()
Dim myParameter As New DB2Parameter("Description", DB2Type.VarChar, _
11, ParameterDirection.Output, True, 0, 0, "Description", DataRowVersion.Current, _
"garden hose")
MessageBox.Show(myParameter.ToString())
End Sub 'CreateDB2Parameter
[C#]
public void CreateDB2Parameter()
{
DB2Parameter myParameter = new DB2Parameter("Description",DB2Type.VarChar,
11,ParameterDirection.Output,true,0,0,"Description",
DataRowVersion.Current,"garden hose");
MessageBox.Show(myParameter.ToString());
}