Asignaciones de tipos de datos administrados (SQL Server Compact)

Microsoft SQL Server Compact 4.0 no admite todos los tipos de datos de .NET; al obtener acceso a los datos mediante ADO.NET, SQL Server Compact 4.0 deberá convertir los tipos no admitidos en otros que sí que se admitan.

Asignaciones de tipos de datos

En la siguiente tabla se muestran las asignaciones de tipos de datos entre SQL Server Compact 4.0 y el proveedor de datos de .NET.

Tipo de datos de .NET

Tipo de datos de SQL Server Compact

binary

varbinary

boolean

bit

byte

tinyint

byte[]

varbinary

datetime

datetime

decimal

numeric

double

float

guid

uniqueidentifier

image

image

int16

smallint

int32

int

int64

bigint

SqlBinary

varbinary

SqlBoolean

bit

SqlByte

tinyint

SqlDecimal¹

numeric

SqlDateTime

datetime

SqlDouble

float

SqlGuid

uniqueidentifier

SqlInt16

smallint

SqlInt32

int

SqlInt64

bigint

SqlMoney

money

SqlSingle

real

SqlString

nvarchar

single

real

string

nvarchar

¹ SQL Server Compact 4.0 solo admite tipos de datos SqlDecimal de hasta 96 bits. Si se superan estos 96 bits, SQL Server Compact genera un error de excepción de desbordamiento.

Vea también

Referencia

Tipos de datos

Otros recursos

Generar aplicaciones administradas (SQL Server Compact)