473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

comparing two VARIANTS

hi

when I try to compare two VARIANTS, i get a compilation error.

when i tried the same in version visual studio 7.0 it works fine but with
7.1 it gives me the following compilation error:
binary '!=' : no operator found which takes a left-hand operand of type
'VARIANT' (or there is no acceptable conversion)

can any one help

Thanks

Sep 27 '06 #1
3 1346

"Vasuki" <Va****@discussions.microsoft.comwrote in message
news:24**********************************@microsof t.com...
hi

when I try to compare two VARIANTS, i get a compilation error.

when i tried the same in version visual studio 7.0 it works fine but with
7.1 it gives me the following compilation error:
binary '!=' : no operator found which takes a left-hand operand of type
'VARIANT' (or there is no acceptable conversion)

can any one help

Thanks
The (somewhat) equivalent generic type in .NET is Object. If you are using
VB 6 or earlier, I'd suggest posting in:

microsoft.public.vb.general.discussion

or one of the other microsoft.public.vb... groups.

Consider using Object instead and using Is and IsNot for comparisons per:

http://msdn.microsoft.com/library/de...adatobject.asp


Sep 27 '06 #2
Iam using C++ in .Net IDE

"pvdg42" wrote:
>
"Vasuki" <Va****@discussions.microsoft.comwrote in message
news:24**********************************@microsof t.com...
hi

when I try to compare two VARIANTS, i get a compilation error.

when i tried the same in version visual studio 7.0 it works fine but with
7.1 it gives me the following compilation error:
binary '!=' : no operator found which takes a left-hand operand of type
'VARIANT' (or there is no acceptable conversion)

can any one help

Thanks
The (somewhat) equivalent generic type in .NET is Object. If you are using
VB 6 or earlier, I'd suggest posting in:

microsoft.public.vb.general.discussion

or one of the other microsoft.public.vb... groups.

Consider using Object instead and using Is and IsNot for comparisons per:

http://msdn.microsoft.com/library/de...adatobject.asp


Sep 27 '06 #3

"Vasuki" <Va****@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
Iam using C++ in .Net IDE
OK, so what project type, and what extensions of C++ are you using that
define type VARIANT?
Is it C++/CLI in Visual Studio 2005, or some other extension and an earlier
version of Visual Studio?
Are you referring to the _variant_t class? If so, read here about
comparisons.

http://msdn2.microsoft.com/en-us/library/x295h94e.aspx
Sep 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: deja | last post by:
Hi all, I am trying to create a product variants facility for an ecommerce site (php/mysql). Each of my products have options & option values stored in the db like this: ...
0
by: Kurt | last post by:
We have some legacy VB 6.0 code that we have to call. I am looking into COM Interoperability. I can instanciate the Runtime Callable Wrapper version of the dll. When I try to call a method, I...
4
by: WayneM | last post by:
I have a vb6 app that uses an array of variants, like a database table that I would like to convert to vb.net. Does it make sense to use an array of objects in vb.net? Any other suggestions? ...
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
2
by: Sterling | last post by:
Any ideas why the following error occurs when "BuildExplicitAccessWithName" is called? PInvoke restriction: can not return variants ----------------------------------------------------- ...
0
by: Thomas W | last post by:
Hello, I'm trying to call a function from a C++ dll which is declared as VARIANT DLLEXPORT ExecuteFunction (LPCSTR); This function (which I can't change) executes a SQL query and returns a...
2
by: bearophileHUGS | last post by:
Notes: - This email is about Mark Dufour's Shed Skin (SS) (http://shed-skin.blogspot.com), but the errors/ingenuousness it contains are mine. My experience with C++ is limited still. - The...
2
by: Pugi! | last post by:
hi, I am using this code for checking wether a value (form input) is an integer and wether it is smaller than a given maximum and greater then a given minimum value: function...
2
by: =?Utf-8?B?U0Q=?= | last post by:
Hi, I'm a complete newbie to .NET and C#. In the project that I'm working on, I have a need to create a C# COM server (and for which I've referred to MSDN samples). This COM server should pass...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.