Values passed in from VBS or JScript to Java always String
When I attempt to pass a numeric value from VBScript or JavaScript into a
Java COM dll by calling an overloaded functions i.e. String func1 (int i)
OR String func1 (String str) the String func1 (String str) is always invoked.
I don't understand why.
ASP CODE
--------
func1(1)
Java Overload Functions
-----------------------
private String func1(String FldName)
{
int index = 0;
index = Row.column_name.indexOf(FldName);
return(((Vector)Row.column_value.elementAt(this.curRecPointer)).elementAt(index).toString( )
);
}
private String func1(int index)
{
if (index > Row.column_name.size())
{
this.Error = -1;
this.ErrDescription = "Field Index out of bounds";
return ("");
}
else return(((Vector)Row.column_value.elementAt(this.curRecPointer)).elementAt(index).toString( )
);
}
Re: Values passed in from VBS or JScript to Java always String
because asp only uses loosely defined types called variants which com can
interprit as string.
Regards
John Timney (MVP)
Gary <gary.frick@compaq.com> wrote in message
news:392dd1ce$1@news.devx.com...
>
> When I attempt to pass a numeric value from VBScript or JavaScript into a
> Java COM dll by calling an overloaded functions i.e. String func1 (int i)
> OR String func1 (String str) the String func1 (String str) is always
invoked.
> I don't understand why.
>
> ASP CODE
> --------
>
> func1(1)
>
> Java Overload Functions
> -----------------------
>
> private String func1(String FldName)
> {
> int index = 0;
> index = Row.column_name.indexOf(FldName);
>
return(((Vector)Row.column_value.elementAt(this.curRecPointer)).elementAt(in
dex).toString()
> );
> }
>
> private String func1(int index)
> {
> if (index > Row.column_name.size())
> {
> this.Error = -1;
> this.ErrDescription = "Field Index out of bounds";
> return ("");
> }
> else
return(((Vector)Row.column_value.elementAt(this.curRecPointer)).elementAt(in
dex).toString()
> );
> }