Passing variables to a com object method written in VB 
Author Message
 Passing variables to a com object method written in VB

I think I have a datatype problem.
I am new to Jscript so bear with me.

I have a Jscript function on a Remote Scripting Asp page. I need it to
return a string that is generated by a com object's method.
The method returns a boolean to indicate success / failure. The problem is
that I don't know what to pass in to the com object in order that I may get
back a string ?

function Deferrals()
  var Cn, vOut;
    // Instance the com object
  Cn = Server.CreateObject("WebFaxGen.clsDatabase");
    // Set a property of the Com object
  Cn.ConnectString = Application("ConnectString");
    // Call the method
  Cn.Get_Product_Deferral_Periods(2, 1, vOut);
    // Output the string that should be returned from the com object
  return vOut;

Com objects method (Written in plain old VB)

Function Get_Product_Deferral_Periods( RetailerId, ProductType, vString) as
    vString = "Test String"
    Get_Product_Deferral_Periods = True
End Function

Any Ideas will be greatly appreciated. :)

Mon, 24 Nov 2003 21:32:11 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Problem with passing result to/from vbscript - Com-object written in C++

2. COM object methods OK in VB Script - Problems in JScript

3. Passing a variable by reference in a COM object

4. Passing Objects to VB COM

5. Passing an Array object to a C++ COM object

6. Need help passing arguments to a COM method...

7. Problem passing XMLDOC to COM Method

8. Passing VB OLE objects in the Application object (IIS3, VB5, ASP, VBS)

9. COM-Object in ASP with COM-Object as parameter

10. COM-Object in ASP with COM-Object as Parameter

11. Passing a variable using hidden method.

12. optional parameters in COM object methods


Powered by phpBB® Forum Software