Within an application, there are a few benefits to creating an instance of an ActiveX (using the CreateObject method) or Java object (using the java.CreateComponent method) against an EAServer component instead of making a MASP method call:
ActiveX or Java objects exist until they go out of scope, whereas MASP calls create an instance of the component, execute it, and destroy it immediately.
ActiveX or Java objects can give any type of return. MASP calls from Dynamo can return only a result set.
Once ActiveX or Java objects are created, they are treated like normal DynaScript objects. MASP calls (except the connection.CreateComponent method) require that you enter a full string each time a call is made. For more information about DynaScript objects, see “Writing DynaScripts” in the PowerDynamo User’s Guide.
If a script requires repeated use of an EAServer component, the creation of an ActiveX object or Java stub is the preferred method of working with an EAServer component and its methods. ActiveX, however, is a Microsoft technology, which means that it is available only on Microsoft operating systems. Java, on the other hand, is platform-independent, which means that Java objects can run anywhere. For a detailed explanation of MASP, see the EAServer Programmer's Guide.
Copyright © 2003. Sybase Inc. All rights reserved. |
![]() |