dotConnect for DB2 Documentation
Devart.Data.DB2 Namespace / DB2Parameter Class / DB2Parameter Constructor / DB2Parameter Constructor(String,DB2Type,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Object)
The name of the parameter.
One of the DB2Type values.
The maximum size, in bytes, of the data within the column.
One of the System.Data.ParameterDirection values.
true if the value of the field can be null; otherwise, false.
The total number of digits to the left and right of the decimal point to which Value is resolved.
The total number of decimal places to which Value is resolved.
The name of the source column.
One of the System.Data.DataRowVersion values.
An Object that is the value of the DB2Parameter.
Example

In This Topic
    DB2Parameter Constructor(String,DB2Type,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Object)
    In This Topic
    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.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal parameterName As String, _
       ByVal dbType As DB2Type, _
       ByVal size As Integer, _
       ByVal direction As ParameterDirection, _
       ByVal isNullable As Boolean, _
       ByVal precision As Byte, _
       ByVal scale As Byte, _
       ByVal sourceColumn As String, _
       ByVal sourceVersion As DataRowVersion, _
       ByVal value As Object _
    )
    public DB2Parameter( 
       string parameterName,
       DB2Type dbType,
       int size,
       ParameterDirection direction,
       bool isNullable,
       byte precision,
       byte scale,
       string sourceColumn,
       DataRowVersion sourceVersion,
       object value
    )

    Parameters

    parameterName
    The name of the parameter.
    dbType
    One of the DB2Type values.
    size
    The maximum size, in bytes, of the data within the column.
    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.
    sourceColumn
    The name of the source column.
    sourceVersion
    One of the System.Data.DataRowVersion values.
    value
    An Object that is the value of the DB2Parameter.
    Example
    The following example creates a new DB2Parameter and displays the ParameterName.
    public void CreateDB2Parameter()
    {
            DB2Parameter myParameter = new DB2Parameter("DName", DB2Type.VarChar, 15, ParameterDirection.Output, true, 0, 0, "DName", DataRowVersion.Current, "DEVELOPMENT");
      MessageBox.Show(myParameter.ToString());
    }
    Public Sub CreateDB2Parameter()
      Dim myParameter As New DB2Parameter("DName", DB2Type.VarChar, 15, ParameterDirection.Output, True, 0, 0, "DName", DataRowVersion.Current, "DEVELOPMENT")
      MessageBox.Show(myParameter.ToString())
    End Sub
    See Also