Conversions Involving VARIANTs

OLE DB Programmer's Reference

The following table describes conversions to and from VARIANTs. Type indicator X can be modified by DBTYPE_ARRAY or DBTYPE_BYREF. No conversions are supported when it is modified by DBTYPE_VECTOR.

Source type indicator Target type indicator Notes
X DBTYPE_VARIANT If X is a valid VARENUM value (that is, it is a type indicator that can be used in a VARIANT), the provider sets vt in the target VARIANT to X and transfers the data to the corresponding element of the union.

If X is not a valid VARENUM value, it is provider-specific whether the provider supports the conversion and what type it uses in the VARIANT. Any such conversions must follow the rules in this appendix.

DBTYPE_VARIANT X If the type indicator specified in the source VARIANT is X, the provider transfers the data.

If the type indicator specified in the VARIANT is not X, it is provider-specific whether the provider supports the conversion. Any such conversions must follow the rules in this appendix.

DBTYPE_VARIANT DBTYPE_VARIANT The provider sets vt in the target VARIANT to the same value as vt in the source VARIANT. It transfers the data from the union element in the source VARIANT to the same element in the target VARIANT.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net