Share via


Data Type Mappings from OLE DB Data Types (SQL Server Compact)

SQL Server Compact 3.5 converts OLE DB data types to native SQL Server Compact 3.5 data types.

Data Type Mappings

The following table shows the mapping of native data types in SQL Server Compact 3.5 to the standard OLE DB data types, including any related properties and limitations.

SQL Server Compact 3.5 data type OLE DB data type OLE DB properties SQL Server Compact 3.5 specifics

bigint

DBTYPE_I8

 

 

binary

DBTYPE_BYTES

DBPROP_COL_FIXEDLENGTH = VARIANT_TRUE

 

bit

DBTYPE_BOOL

 

 

datetime

DBTYPE_DBTIMESTAMP

 

Valid year range 1753-9999; valid second range 0-59

float

DBTYPE_R8

 

 

image

DBTYPE_BYTES

 

 

integer

DBTYPE_I4

 

 

money

DBTYPE_CY

 

 

national character

DBTYPE_WSTR

DBPROP_COL_FIXEDLENGTH = VARIANT_TRUE

 

national character varying

DBTYPE_WSTR

DBPROP_COL_FIXEDLENGTH = VARIANT_FALSE

 

ntext

DBTYPE_WSTR

 

 

numeric

DBTYPE_NUMERIC

 

 

real

DBTYPE_R4

 

 

smallint

DBTYPE_I2

 

 

uniqueidentifier

DBTYPE_GUID

 

 

tinyint

DBTYPE_UI1

 

 

varbinary

DBTYPE_BYTES

DBPROP_COL_FIXEDLENGTH = VARIANT_FALSE

 

See Also

Reference

OLE DB Provider Reference (SQL Server Compact)

Other Resources

Building Native Applications (SQL Server Compact)

Help and Information

Getting Assistance (SQL Server Compact 3.5 Service Pack 1)