Compartir a través de


SqlCeParameter.SqlDbType Propiedad

Obtiene o establece la enumeración SqlDbType del parámetro.

Espacio de nombres:  System.Data.SqlServerCe
Ensamblado:  System.Data.SqlServerCe (en System.Data.SqlServerCe.dll)

Sintaxis

'Declaración
<DbProviderSpecificTypePropertyAttribute(True)> _
Public Property SqlDbType As SqlDbType
    Get
    Set
'Uso
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)

Valor de la propiedad

Tipo: System.Data.SqlDbType
Uno de los valores del control SqlDbType. El valor predeterminado es NVarChar.

Comentarios

Las propiedades SqlDbType y DbType están vinculadas. Por tanto, al establecer el valor de DbType, SqlDbType cambia a una propiedad SqlDbType compatible.

El proveedor de .NET para SQL Server Compact admite los siguienes 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

Para obtener una lista de tipos de datos compatibles, vea la propiedad DbType correspondiente.

Ejemplos

En el ejemplo siguiente se crea un objeto SqlCeParameter y se establece la propiedad SqlDbType.

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

Vea también

Referencia

SqlCeParameter Clase

Espacio de nombres System.Data.SqlServerCe