DbType Property

SqlCeParameter.DbType Property

Gets or sets the DbType of the parameter.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

public override DbType DbType { get; set; }

Property Value

Type: System.Data.DbType
One of the DbType values. The default is String.

Implements

IDataParameter.DbType

ExceptionCondition
ArgumentOutOfRangeException

The property was not set to a valid DbType.

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

The SQL Server Compact .NET Provider supports the following values of DbType:

The following example creates a SqlCeParameter and sets the DbType property.

SqlCeParameter param = new SqlCeParameter();
param.DbType = DbType.String;


Show:
© 2016 Microsoft