In rowsets and as parameter values, SQLOLEDB represents SQL Server data by using the following OLE DB defined data types.
SQL Server data type |
SQLOLEDB type reported in IColumnsInfo::GetColumnInfo and ICommandWithParameters::GetParameterInfo |
binary | DBTYPE_BYTES |
bit | DBTYPE_BOOL |
char | DBTYPE_STR |
datetime | DBTYPE_DBTIMESTAMP |
decimal | DBTYPE_NUMERIC |
float | DBTYPE_R8 |
image | DBTYPE_BYTES |
int | DBTYPE_I4 |
money | DBTYPE_CY |
numeric | DBTYPE_NUMERIC |
real | DBTYPE_R4 |
smalldatetime | DBTYPE_DBTIMESTAMP |
smallint | DBTYPE_I2 |
smallmoney | DBTYPE_CY |
sysname | DBTYPE_WSTR |
text | DBTYPE_STR |
timestamp | DBTYPE_BYTES |
tinyint | DBTYPE_UI1 |
uniqueidentifier | DBTYPE_GUID |
varbinary | DBTYPE_BYTES |
varchar | DBTYPE_STR |
SQLOLEDB supports consumer-requested data conversions as shown: