SqlCeParameter.DbType Property
Gets or sets the DbType of the parameter.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Syntax
'Declaration
Public Overrides Property DbType As DbType
public override DbType DbType { get; set; }
public:
virtual property DbType DbType {
DbType get () override;
void set (DbType value) override;
}
/** @property */
public DbType get_DbType ()
/** @property */
public void set_DbType (DbType value)
public override function get DbType () : DbType
public override function set DbType (value : DbType)
Property Value
One of the DbType values. The default is String.
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | The property was not set to a valid DbType. |
Remarks
SqlDbType and DbType are linked. Therefore, setting the DbType changes the SqlDbType to a supporting SqlDbType.
The SQL Server Compact 3.5 SP1 .NET Provider supports the following values of DbType:
String
Example
The following example creates a SqlCeParameter and sets the DbType property.
Dim param As New SqlCeParameter()
param.DbType = DbType.String
SqlCeParameter param = new SqlCeParameter();
param.DbType = DbType.String;
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
Version Information
.NET Framework and NET Compact Framework
Supported in 3.5
.NET Framework
Supported in 3.0
.NET Compact Framework and .Net Framework
Supported in 2.0
See Also
Reference
SqlCeParameter Class
SqlCeParameter Members
System.Data.SqlServerCe Namespace
SqlCeType