Proprietà SqlCeParameter.SqlDbType

Ottiene o imposta l'enumerazione SqlDbType del parametro.

Spazio dei nomi  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Sintassi

'Dichiarazione
<DbProviderSpecificTypePropertyAttribute(True)> _
Public Property SqlDbType As SqlDbType
    Get
    Set
'Utilizzo
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)

Valore proprietà

Tipo: System.Data.SqlDbType
Uno dei valori dell'oggetto SqlDbType. Il valore predefinito è NVarChar.

Osservazioni

Le proprietà SqlDbType e DbType sono collegate. Di conseguenza, l'impostazione della proprietà DbType determina la modifica della proprietà SqlDbType in un'enumerazione SqlDbType di supporto.

Il provider .NET di SQL Server Compact supporta i seguenti valori di SqlDbType:

  • 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

Per un elenco dei tipi di dati supportati, vedere la proprietà DbType appropriata.

Esempi

Nell'esempio riportato di seguito viene creato un oggetto SqlCeParameter e viene impostata la relativa proprietà SqlDbType.

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

Vedere anche

Riferimento

SqlCeParameter Classe

Spazio dei nomi System.Data.SqlServerCe