SqlCeParameter.SqlDbType Property
Gets or sets the SqlDbType of the parameter.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Syntax
'Declaration
<DbProviderSpecificTypePropertyAttribute(True)> _
Public Property SqlDbType As SqlDbType
[DbProviderSpecificTypePropertyAttribute(true)]
public SqlDbType SqlDbType { get; set; }
[DbProviderSpecificTypePropertyAttribute(true)]
public:
property SqlDbType SqlDbType {
SqlDbType get ();
void set (SqlDbType value);
}
/** @property */
public SqlDbType get_SqlDbType ()
/** @property */
public void set_SqlDbType (SqlDbType value)
public function get SqlDbType () : SqlDbType
public function set SqlDbType (value : SqlDbType)
Property Value
One of the SqlDbType values. The default is NVarChar.
Remarks
The 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 SqlDbTypes:
SqlDbType.TinyInt
SqlDbType.SmallInt
SqlDbType.Int
SqlDbType.BigInt
SqlDbType.Real
SqlDbType.Float
SqlDbType.Money
SqlDbType.Bit
SqlDbType.Binary
SqlDbType.VarBinary
SqlDbType.UniqueIdentifier
SqlDbType.Image
SqlDbType.NText
SqlDbType.NChar
SqlDbType.NVarChar
SqlDbType.Decimal
SqlDbType.DateTime
For a list of the supported data types, see the appropriate DbType property.
Example
The following example creates a SqlCeParameter and sets the SqlDbType property.
Dim param As New SqlCeParameter()
param.SqlDbType = SqlDbType.NText
SqlCeParameter param = new SqlCeParameter();
param.SqlDbType = SqlDbType.NText;
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