Solved

COleVariant

Posted on 1998-08-30
1
390 Views
Last Modified: 2008-03-06
Need some help in converting COleVariant into actual strings that I can use.  Here is an exerpt of code that retreives a project number from an Access DB:  

COleVariant vProject = ProjectSet.GetFieldValue("ProjectNumber");

Now, what I need is to compare vProject to a CString data type so how do I convert it?

Is there any place I could find help on this as what is in VC++ isn't really geared towards conversion of data types.

-Brent
0
Comment
Question by:xlr8tn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
prasanth earned 50 total points
ID: 1171621
CString str =  V_BSTR(&vProject);

I agree the documentation isn't too great in this area. But all the extraction macros for the various data types are defined in OLEAUTO.H
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question