Data Type Conversions Supported by MSDADC.DLL

The Data Conversion Library supports a limited set of conversions. The DBTYPE_BYREF modifier is only supported on the destination type for variable length data types (DBTYPE_BYTES, DBTYPE_STR, DBTYPE_VARNUMERIC, and DBTYPE_WSTR).

In the conversion tables, an X indicates that the conversion is supported by MSDADC.DLL. All data types can be converted to the same data type.

Note   Supported data conversions can be determined through the IConvertType interface.

Conversions Supported from Data Type I1

Convert to type Convert to type
I2 X DBTIME
I4 X DBTIMESTAMP
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES
UI4 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT
VARNUMERIC X

Conversions Supported from Data Type I2

Convert to type Convert to type
I1 X DBTIME
I4 X DBTIMESTAMP
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES
UI4 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type I4

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type I8

Convert to type Convert to type
I1 DBTIME
I2 DBTIMESTAMP
I4 BOOL
I8 X BSTR
UI2 BYTES
UI4 Empty X
UI8 X ERROR
R4 GUID
R8 IDISPATCH
CY IUNKNOWN
DECIMAL NULL X
NUMERIC STR X
DATE VARIANT X
DBDATE WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type UI1

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI2 X BYTES
UI4 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type UI2

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI4 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type UI4

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES X
UI2 X Empty X
UI8 X ERROR
R4 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type UI8

Convert to type Convert to type
I1 DBTIME
I2 DBTIMESTAMP
I4 BOOL
I8 X BSTR
UI2 BYTES
UI4 Empty X
UI8 X ERROR
R4 GUID
R8 IDISPATCH
CY IUNKNOWN
DECIMAL NULL X
NUMERIC STR X
DATE VARIANT X
DBDATE WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type R4

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type R8

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
CY X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type CY

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
DECIMAL X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type DECIMAL

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
NUMERIC X STR X
DATE X VARIANT X
DBDATE WSTR X
FILETIME PROPVARIANT
VARNUMERIC X

Conversions Supported from Data Type NUMERIC

Convert to type Convert to type
I1 X DBTIME
I2 X DBTIMESTAMP
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
DECIMAL X STR X
DATE X VARIANT X
DBDATE WSTR X

Conversions Supported from Data Type DATE

Convert to type Convert to type
I1 X DBTIME X
I2 X DBTIMESTAMP X
I4 X BOOL X
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
DECIMAL X STR X
NUMERIC X VARIANT X
DBDATE X WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type DBDATE

Convert to type Convert to type
I1 DBTIME X
I2 DBTIMESTAMP X
I4 BOOL
I8 BSTR X
UI1 BYTES
UI2 Empty X
UI4 ERROR
UI8 GUID
R4 IDISPATCH
R8 IUNKNOWN
CY NULL X
DECIMAL STR X
NUMERIC VARIANT X
DATE X WSTR X
FILETIME PROPVARIANT
VARNUMERIC

Conversions Supported from Data Type DBTIME

Convert to type Convert to type
I1 DBDATE X
I2 DBTIMESTAMP X
I4 BOOL
I8 BSTR X
UI1 BYTES
UI2 Empty X
UI4 ERROR
UI8 GUID
R4 IDISPATCH
R8 IUNKNOWN
CY NULL X
DECIMAL STR X
NUMERIC VARIANT X
DATE X WSTR X
FILETIME PROPVARIANT
VARNUMERIC

Conversions Supported from Data Type DBTIMESTAMP

Convert to type Convert to type
I1 DBDATE X
I2 DBTIME X
I4 BOOL
I8 BSTR X
UI1 BYTES
UI2 Empty X
UI4 ERROR
UI8 GUID
R4 IDISPATCH
R8 IUNKNOWN
CY NULL X
DECIMAL STR X
NUMERIC VARIANT X
DATE X WSTR X
FILETIME PROPVARIANT
VARNUMERIC

Conversions Supported from Data Type BOOL

Convert to type Convert to type
I1 X DBDATE
I2 X DBTIME
I4 X DBTIMESTAMP
I8 X BSTR X
UI1 X BYTES
UI2 X Empty X
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type BSTR

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BYTES X
UI2 X Empty X
UI4 X ERROR
UI8 X GUID X
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type BYTES

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 BOOL
UI1 BSTR X
UI2 Empty X
UI4 X ERROR
UI8 GUID
R4 IDISPATCH
R8 IUNKNOWN
CY NULL X
DECIMAL STR X
NUMERIC VARIANT X
DATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type Empty

Convert to type Convert to type
I1 X DBDATE
I2 X DBTIME
I4 X DBTIMESTAMP
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES
UI4 X ERROR
UI8 X GUID
R4 X IDISPATCH
R8 X IUNKNOWN
CY X NULL X
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type ERROR

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 BOOL
UI1 BSTR
UI2 BYTES
UI4 Empty
UI8 GUID
R4 IDISPATCH
R8 IUNKNOWN
CY NULL
DECIMAL STR
NUMERIC VARIANT X
DATE WSTR
FILETIME PROPVARIANT
VARNUMERIC

Conversions Supported from Data Type GUID

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 BOOL
UI1 BSTR X
UI2 BYTES
UI4 Empty X
UI8 ERROR
R4 IDISPATCH
R8 IUNKNOWN
CY NULL X
DECIMAL STR X
NUMERIC VARIANT X
DATE WSTR X
FILETIME PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type IDISPATCH

Convert to type Convert to type
I1 X DBDATE
I2 X DBTIME
I4 X DBTIMESTAMP
I8 BOOL X
UI1 X BSTR X
UI2 X BYTES
UI4 X Empty X
UI8 ERROR
R4 X GUID
R8 X IUNKNOWN X
CY X NULL X
DECIMAL X STR
NUMERIC VARIANT X
DATE X WSTR
FILETIME PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type IUNKNOWN

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 BOOL
UI1 BSTR
UI2 BYTES
UI4 Empty X
UI8 ERROR
R4 GUID
R8 IDISPATCH X
CY NULL X
DECIMAL STR
NUMERIC VARIANT X
DATE WSTR
FILETIME PROPVARIANT
VARNUMERIC

Conversions Supported from Data Type NULL

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 BOOL
UI1 BSTR
UI2 BYTES
UI4 Empty
UI8 ERROR
R4 GUID
R8 IDISPATCH
CY IUNKNOWN
DECIMAL STR
NUMERIC VARIANT X
DATE WSTR
FILETIME PROPVARIANT X
VARNUMERIC

Conversions Supported from Data Type STR

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR
R4 X GUID X
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type VARIANT

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR X
R4 X GUID X
R8 X IDISPATCH X
CY X IUNKNOWN X
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type WSTR

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR
R4 X GUID X
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type FILETIME

Convert to type Convert to type
I1 DBDATE
I2 DBTIME
I4 DBTIMESTAMP
I8 X BOOL
UI1 BSTR X
UI2 BYTES
UI4 Empty X
UI8 X ERROR
R4 GUID
R8 IDISPATCH
CY IUNKNOWN
DECIMAL STR X
NUMERIC VARIANT X
DATE X WSTR X
FILETIME PROPVARIANT X
VARNUMERIC WSTR X

Conversions Supported from Data Type PROPVARIANT

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR X
R4 X GUID X
R8 X IDISPATCH X
CY X IUNKNOWN X
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X

Conversions Supported from Data Type VARNUMERIC

Convert to type Convert to type
I1 X DBDATE X
I2 X DBTIME X
I4 X DBTIMESTAMP X
I8 X BOOL X
UI1 X BSTR X
UI2 X BYTES X
UI4 X Empty X
UI8 X ERROR
R4 X GUID X
R8 X IDISPATCH
CY X IUNKNOWN
DECIMAL X STR X
NUMERIC X VARIANT X
DATE X WSTR X
FILETIME X PROPVARIANT X
VARNUMERIC X