Forum Discussion

kktsenthil's avatar
kktsenthil
Occasional Contributor
10 years ago

Type mismatch: 'myAdd'

HI All,

 

I was getting an error message while passing parameter from one funtion to another funtion in vbscript

some one can you help me.

  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor

    Hi  Kksenthil

     

    Without knowing what the function is and the parameter passed, it's difficult to be precice.  However, this kind of error is usually down to the function expecting a numeric (or text based) parameter, but receives the other type.  If it is expecting a numeric value, let's say an integer value, before passing the argument, try converting it by using CInt(<your argument>)  This will, if possible, convert it to an actual integer, whereby the function will be able to use it.

     

    As I said, without specifics, it's difficult to be more precise and the above example is only one possibility, there are others, but hopefully this will at least point you in the right direction.

     

    Regards

    Stephen.

  • Hi kktsenthil,

     

    You could surround you paramenter with one of the aqConvert methods. My preferred are aqConvert.VarToStr(), aqConvert.VarToInt() but there are a pletora of others that could be useful.