Condividi tramite


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)
Not applicable.

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 Edition .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;

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

SqlCeParameter Class
SqlCeParameter Members
System.Data.SqlServerCe Namespace