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
'Usage
Dim instance As SqlCeParameter
Dim value As DbType
value = instance.DbType
instance.DbType = value
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 |
---|---|
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 Mobile.NET Provider supports the following DBTypes:
DbType.Byte
DbType.Int16
DbType.Int32
DbType.Int64
DbType.SByte
DbType.UInt16
DbType.UInt32
DbType.UInt64
DbType.Binary
DbType.Boolean
DbType.Currency
DbType.DateTime
DbType.Decimal
DbType.Double
DbType.Guid
DbType.Single
DbType.String
DbType.StringFixedLength
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;
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0, 1.0
See Also
Reference
SqlCeParameter Class
SqlCeParameter Members
System.Data.SqlServerCe Namespace
SqlCeType