Data Type Conversion Errors

 

A message indicating that a data type conversion could not take place uses a numeric code to identify the data type. The following tables translate the numeric codes into their equivalent variant data types (for Visual C++) and Automation data types (for Visual Basic).

Numeric CodeVariant Data TypeAutomation Data Type
0x0000VT_EMPTYnothing
0x0002VT_I22-byte signed int
0x0003VT_I44-byte signed int
0x0004VT_R44-byte real
0x0005VT_R88-byte real
0x0006VT_CYcurrency
0x0007VT_DATEdate
0x0008VT_BSTROLE Automation string
0x0009VT_DISPATCHIDispatch * (currently only for recordset pointer)
0x000bVT_BOOLTrue=-1, False=0
0x000cVT_VARIANTVARIANT *
0x000eVT_DECIMAL16-byte fixed point
0x0011VT_UI1unsigned char
0x0018VT_VOIDC style void
0x001bVT_SAFEARRAY(use VT_ARRAY in VARIANT)
0x001dVT_USERDEFINEDuser-defined type

Arrays of the following types have these codes:

Numeric CodeVariant Data TypeAutomation Data Type
0x2000VT_EMPTYnothing
0x2002VT_I22-byte signed int
0x2003VT_I44-byte signed int
0x2004VT_R44-byte real
0x2005VT_R88-byte real
0x2006VT_CYcurrency
0x2007VT_DATEdate
0x2008VT_BSTROLE Automation string
0x2009VT_DISPATCHIDispatch * (currently only for recordset pointer)
0x200bVT_BOOLTrue=-1, False=0
0x200cVT_VARIANTVARIANT *
0x200eVT_DECIMAL16-byte fixed point
0x2011VT_UI1unsigned char
0x2018VT_VOIDC style void
0x201bVT_SAFEARRAY(use VT_ARRAY in VARIANT)
0x201dVT_USERDEFINEDuser-defined type

The following types are passed by reference:

Numeric CodeVariant Data TypeAutomation Data Type
0x4000VT_EMPTYnothing
0x4002VT_I22-byte signed int
0x4003VT_I44-byte signed int
0x4004VT_R44-byte real
0x4005VT_R88-byte real
0x4006VT_CYcurrency
0x4007VT_DATEdate
0x4008VT_BSTROLE Automation string
0x4009VT_DISPATCHIDispatch * (currently only for recordset pointer)
0x400bVT_BOOLTrue=-1, False=0
0x400cVT_VARIANTVARIANT *
0x400eVT_DECIMAL16-byte fixed point
0x4011VT_UI1unsigned char
0x4018VT_VOIDC style void
0x401bVT_SAFEARRAY(use VT_ARRAY in VARIANT)
0x401dVT_USERDEFINEDuser-defined type

Arrays of the following types are passed by reference:

Numeric CodeVariant Data TypeAutomation Data Type
0x6000VT_EMPTYnothing
0x6002VT_I22-byte signed int
0x6003VT_I44-byte signed int
0x6004VT_R44-byte real
0x6005VT_R88-byte real
0x6006VT_CYcurrency
0x6007VT_DATEdate
0x6008VT_BSTROLE Automation string
0x6009VT_DISPATCHIDispatch * (currently only for recordset pointer)
0x600bVT_BOOLTrue=-1, False=0
0x600cVT_VARIANTVARIANT *
0x600eVT_DECIMAL16-byte fixed point
0x6011VT_UI1unsigned char
0x6018VT_VOIDC style void
0x601bVT_SAFEARRAY(use VT_ARRAY in VARIANT)
0x601dVT_USERDEFINEDuser-defined type
Show: