VBScript does not support optional parameters. I think that would preclude
the possibility of any support for overloaded functions as well.
You might give jscript a try. If that doesn't work you will have to just use
the 4-parameter version each time or modify the object so that the functions
are no longer overloaded.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Cindy Liu" <Ci******@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Yes, I did create an instance of my COM+ object. Line 16 is the line that
I call the method with 2 params.
Why I need 2 methods with same name and different signature? Because these
methods perform the same functionality, one need to pass in user name and
password, the another uses the credential specified in the configuration
file.
Do I answer your questions?
Cindy
"Ray at <%=sLocation%> [MVP]" wrote:
"Cindy Liu" <Cindy Li*@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com... Hi Everyone,
I created C# COM+ component. It has two overloaded methods - the
method names are same
Why?!
and their signatures are different, one takes two parameters and
another takes four. I coded this way: the method with 4 parameters is coded
first and then the one with 2 parameters.
I created very simple ASP page to call these two methods. Calling the
method with 4 params has no problem. However, calling the method with 2
params I get the error saying:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'SetReferenceValues'
/suitevoyager/testLmx.asp, line 16
What is the line of code on line 16? Have you created an instance of
the object at this point?
Ray at work