Propriété SqlCeParameter.SqlDbType

Obtient ou définit le SqlDbType du paramètre.

Espace de noms :  System.Data.SqlServerCe
Assembly :  System.Data.SqlServerCe (en System.Data.SqlServerCe.dll)

Syntaxe

'Déclaration
<DbProviderSpecificTypePropertyAttribute(True)> _
Public Property SqlDbType As SqlDbType
    Get
    Set
'Utilisation
Dim instance As SqlCeParameter
Dim value As SqlDbType

value = instance.SqlDbType

instance.SqlDbType = value
[DbProviderSpecificTypePropertyAttribute(true)]
public SqlDbType SqlDbType { get; set; }
[DbProviderSpecificTypePropertyAttribute(true)]
public:
property SqlDbType SqlDbType {
    SqlDbType get ();
    void set (SqlDbType value);
}
[<DbProviderSpecificTypePropertyAttribute(true)>]
member SqlDbType : SqlDbType with get, set
function get SqlDbType () : SqlDbType
function set SqlDbType (value : SqlDbType)

Valeur de propriété

Type : System.Data.SqlDbType
Une des valeurs de SqlDbType. Le type par défaut est NVarChar.

Notes

SqlDbType et DbType sont liés. Par conséquent, la définition de DbType remplace SqlDbType par un SqlDbType pris en charge.

Le fournisseur .NET de SQL Server Compact prend en charge les SqlDbTypes suivants :

  • 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

Pour obtenir la liste des types de données pris en charge, consultez la propriété DbType appropriée.

Exemples

L'exemple suivant crée un SqlCeParameter et définit la propriété SqlDbType.

Dim param As New SqlCeParameter()
param.SqlDbType = SqlDbType.NText
SqlCeParameter param = new SqlCeParameter();
param.SqlDbType = SqlDbType.NText;

Voir aussi

Référence

SqlCeParameter Classe

Espace de noms System.Data.SqlServerCe