Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SqlCeParameter.SqlDbType Property

Gets or sets the SqlDbType of the parameter.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
[DbProviderSpecificTypePropertyAttribute(true)]
public SqlDbType SqlDbType { get; set; }

Property Value

Type: System.Data.SqlDbType
One of the SqlDbType values. The default is NVarChar.

The SqlDbType and DbType are linked. Therefore, setting the DbType changes the SqlDbType to a supporting SqlDbType.

The SQL Server Compact .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.

The following example creates a SqlCeParameter and sets the SqlDbType property.

SqlCeParameter param = new SqlCeParameter();
param.SqlDbType = SqlDbType.NText;


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.