Error while submitting decimal values!!!!

HanenHanen Member Posts: 281
HI,

I'm passing a decimal value as parameter to a wcf service but I got an error message :

this message for c/al programmers:

this data type is not supported by c/side.you can access data from any of the folloing data types:vT_void,VI_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR and VT_BOOL
I think it's because of the separator :( I have to change the "." to ",", someone can help please!!!!!!!!

Thanks
Regards

Hanen TALBI

Comments

  • rdebathrdebath Member Posts: 383
    The separator is not relevant. The argument on the automation object that you're calling (or a event from it) is not one of the simple automation types that NAV understands. The error gives you the list; I would guess your argument is a byte array type as you seem to be treating it as a string. As you should know a real string ie a VT_BSTR is a unicode string. But it you want to pass a number you should be using a type that maps to a float or double.
  • HanenHanen Member Posts: 281
    Hi,

    Thanks for your answer, I want to pass a decimal field to an external application using "," as separator :( that's the problem
    Do you know how can I deal with that???? :oops:


    Thanks a lot
    Regards

    Hanen TALBI
  • rdebathrdebath Member Posts: 383
    If you're passing a decimal to an automation it's stored as a number it can't have a separator.

    If you're passing a string to an automation the automation has to use a VT_BSTR type.
    In Navision to convert a decimal to a string with commas you just use FORMAT(Number) or give a format string if you need more control.

    The separator does not have anything to do with your error message.
Sign In or Register to comment.