Home All Groups Group Topic Archive Search About
Author
11 Dec 2006 1:15 PM
imonline
Hi,
     I have developed a webservice with OTA compliance using WSCF 0.6.
Now eveything works fine but the soap messages with paymentcard node is
giving me following error.

   (70, 29). ---> System.InvalidCastException: Operator '<>'
is not defined for 'Nothing'
and type 'PaymentCardType'

Please let me know what am I doing wrong.

Regards,
Nis

Author
11 Dec 2006 1:30 PM
Chris Dunaway
>    (70, 29). ---> System.InvalidCastException: Operator '<>'
> is not defined for 'Nothing'
> and type 'PaymentCardType'
>

Without seeing some code, it's difficult to know what is wrong.  It
appears that you are trying to use the <> operator when comparing
against Nothing, as in

If x <> Nothing Then      'This is not allowed
    'Do something
End If

In VB, to check for Nothing, you must use this form:

If Not x Is Nothing Then
    'Do something
End If

Or if you're using .Net 2.0, you can use this:

If x IsNot Nothing Then
    'do something
End If


This is just a guess, though.  Post the relevant portion of the code
and perhaps you could get more help.

Chris