Share via


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
Public Property SqlDbType As SqlDbType
'Usage
Dim instance As SqlCeParameter
Dim value As SqlDbType

value = instance.SqlDbType

instance.SqlDbType = value
public SqlDbType SqlDbType { get; set; 
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 Mobile.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;

.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