?
Solved

COleVariant

Posted on 1998-08-30
1
Medium Priority
?
391 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 150 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

770 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