Compartir a través de


Type Indicators in a Microsoft SQL Server Provider

This table shows how a Microsoft SQL Server provider might map its data types to OLE DB data types.

Microsoft SQL Server data type

OLE DB type indicator

char [(n)] (1 = n = 255)

DBTYPE_STR

varchar [(n)] (1 = n = 255)

DBTYPE_STR

binary [(n)] (1 = n = 255)

DBTYPE_BYTES

varbinary [(n)] (1 = n = 255)

DBTYPE_BYTES

numeric [(p[,s])]

DBTYPE_NUMERIC

decimal [(p[,s])]

DBTYPE_NUMERIC

tinyint

DBTYPE_UI1

smallint

DBTYPE_I2

int

DBTYPE_I4

real

DBTYPE_R4

float [(n)]

DBTYPE_R8

smalldatetime

DBTYPE_DATE, DBTYPE_DBTIMESTAMP

datetime

DBTYPE_DATE, DBTYPE_DBTIMESTAMP

timestamp

DBTYPE_BYTES (DBCOLUMNFLAGS_ISROWVER is set)

text

DBTYPE_STR

image

DBTYPE_BYTES

smallmoney

DBTYPE_CY

money

DBTYPE_CY

user-defined-type

DBTYPE_UDT