In rowsets and as parameter values, SQLOLEDB represents Microsoft® SQL Server™ data by using the following OLE DB defined data types, reported in the functions IColumnsInfo::GetColumnInfo and ICommandWithParameters::GetParameterInfo.
| SQL Server data type | SQLOLEDB data type |
|---|---|
| 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 |
| nchar | DBTYPE_WSTR |
| ntext | DBTYPE_WSTR |
| numeric | DBTYPE_NUMERIC |
| nvarchar | DBTYPE_WSTR |
| 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 in the illustration.
