Using COM objects that return recordsets from JScript 
Author Message
 Using COM objects that return recordsets from JScript

I have a number of VB Com objects that return ADO recordsets.  Can I use these
from JScript?  

The Com objects work like this:

Public Function GetSubs( _
                        ByVal strCustnum As Variant, _
                        ByRef rsSubs As Variant _
                       ) As Variant

.
.
.
    Set rsSubs = rsQFSubs

End Function

Is there any way to use these object from JScript or do I have to rewrite the
objects to use arrays as arguments (and, if I do, will it work?):

Public Function GetSubs( _
                        ByVal strCustnum As Variant, _
                        ByRef rsSubs As Variant _
                       ) As Variant

.
.
.
    Set rsSubs[0] = rsQFSubs ' Where rsSubs was passed as an
                             ' array with one element

End Function



Fri, 16 May 2003 03:00:00 GMT  
 Using COM objects that return recordsets from JScript
J(ava)Script doesn't support "byref" parameters. You will probably need
to return the recordset as the function result for this to work.

Hans Kesting


I have a number of VB Com objects that return ADO recordsets.  Can I use
these
from JScript?

The Com objects work like this:

Public Function GetSubs( _
                        ByVal strCustnum As Variant, _
                        ByRef rsSubs As Variant _
                       ) As Variant

.
.
.
    Set rsSubs = rsQFSubs

End Function

Is there any way to use these object from JScript or do I have to rewrite
the
objects to use arrays as arguments (and, if I do, will it work?):

Public Function GetSubs( _
                        ByVal strCustnum As Variant, _
                        ByRef rsSubs As Variant _
                       ) As Variant

.
.
.
    Set rsSubs[0] = rsQFSubs ' Where rsSubs was passed as an
                             ' array with one element

End Function



Sat, 17 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. JSCript and returning parameters from COM object

2. Capturing return values in JScript from C++ COM objects

3. Returning COM/ActiveX objects to JScript

4. Using COM objects with IN/OUT params from JScript

5. Using COM object enums in jscript

6. Accessing COM objects and interfaces using JScript.

7. Returning recordsets with remote scripting in Jscript

8. Returning Array of Strings from COM to JScript

9. Using a Date Range to return data in a recordset

10. returning empty variant array from COM object?

11. JavaScript access variant array returned by COM object?

12. COM Object Return Multiple Arguments

 

 
Powered by phpBB® Forum Software