OleDbParameter.DbType OleDbParameter.DbType OleDbParameter.DbType OleDbParameter.DbType Property

Definition

Gets or sets the DbType of the parameter.

public:
 virtual property System::Data::DbType DbType { System::Data::DbType get(); void set(System::Data::DbType value); };
[System.ComponentModel.Browsable(false)]
[System.Data.DataSysDescription("DataParameter_DbType")]
public override System.Data.DbType DbType { get; set; }
member this.DbType : System.Data.DbType with get, set
Public Overrides Property DbType As DbType

Property Value

One of the DbType values. The default is String.

Implements

Exceptions

Examples

The following example creates an OleDbParameter and sets some of its properties.

public void CreateOleDbParameter() 
 {
    OleDbParameter parameter = new OleDbParameter("Description", OleDbType.VarChar, 88);
    parameter.Direction = ParameterDirection.Output;
 }
Public Sub CreateOleDbParameter()
    Dim parameter As New OleDbParameter("Description", OleDbType.VarChar, 88)
    parameter.Direction = ParameterDirection.Output
End Sub 

Remarks

The OleDbType and DbType are linked. Therefore, setting the DbType changes the OleDbType to a supporting OleDbType.

For a list of the supported data types, see the appropriate OleDbType member. For more information, see DataAdapter Parameters.

Applies to

See also