Re: [Re: VBScript/COM and OneWorld]

b_gilmore

Well Known Member
Re: [Re: VBScript/COM and OneWorld]

Thanks for the reply. It's good to know I'm not alone.

I'm assuming that the process to call a BSFN with Com is as follows:

Create the Connector object
Call the Login Method to establish a session
Create the OneWorldHelper Object with the CreateBusinessObject method
Create the Wrapped BSFN object with the CreateBusinessObject method
Create the Parameterset object with the Get<BSFN>Parameterset method of the
wrapped BSFN object
Execute the JDE function by calling the Wrapped object's method (e.g.
wrapperObject.GetEffectiveAddress) with 4 parameters as follows:
<Parameterset Object>, <Help Object>, <connector object>, <session id>

Does this look like the correct steps?

All of this works using VBScript except the statement when you try to execute
the function. It throws a type mismatch on the first parameter (i.e.
<Parameterset Object>). I've verified thru the debugger that the Parameterset
object is created and does exist. I can even assign values to the properties
in the object with a statement like:
Set d = dstr.mnAddressNumber ' which passes a MathNumeric object
d.Value=95250

I'm stumped. Has anyone gotten this to work thru ASP with a pure VBScript of
JScript solution?

Thanks.


PatrickT <[email protected]> wrote:
that runs with VB6 :Option ExplicitDim OneWorld As New OneWorldInterfaceDim
conn As New ConnectorDim Wrapper As New B0500420Dim Dstr As New D0500420Dim
Session As LongSub main() Session = conn.Login("JDE", "******",
"DV7333") Set OneWorld =
conn.CreateBusinessObject("OneWorld.FunctionHelper.1", Session) Set
Wrapper = conn.CreateBusinessObject("B0500420.B0500420", Session) Set
Dstr = conn.CreateBusinessObject("B0500420.D0500420", Session)
Wrapper.CreateGetCurrentDateandTimeParameterset
Wrapper.GetCurrentDateandTime Dstr, OneWorld, conn, Session MsgBox
Dstr.szDateTime conn.Logoff Session Set Wrapper = Nothing
Set Dstr = Nothing Set OneWorld = NothingEnd Su
 
Back
Top