“ActiveX datatype support” lists the ActiveX types supported by EAServer, as well as the equivalent EAServer Manager and CORBA IDL types.
EAServer components appear as automation objects in the ActiveX-enabled IDE. If your IDE supports it, you can simply drag and drop the component method into your ActiveX client code and use the IDE’s object browser to see the component’s method syntax. You must call the proxy methods using the syntax required by your development tool.
To execute a component method, execute the method on the proxy
object. In this example, the GetEmployeeInfo() and
the SetEmployeeInfo() methods are executed on employeeproxy
.
The parameters in the SetEmployeeInfo() method
are in parameters. The parameters in the GetEmployeeInfo() method
are inout parameters.
String name Long age String sex name = "John" age = 32 sex = "male" // Example for parameters using the in argument mode employeeproxy.SetEmployeeInfo (name, age, sex) // Example for parameters using the inout argument mode employeeproxy.GetEmployeeInfo (REF name, REF age, REF sex)
Methods may return result sets. After a method invocation, you can retrieve result sets as described in “Result-set support”.
If a component that the ActiveX client accesses is an ActiveX component and a C++ IDE such as Visual C++ was used to develop it, string parameter types are always passed by reference (as BSTR *). Make sure that you defined these parameters as inout in EAServer Manager.
When you invoke component methods, these restrictions apply:
You must pass parameters in a datatype that is equivalent to the corresponding parameter’s datatype in the EAServer method definition. See “ActiveX datatype support” for more information.
You must pass parameters by position; named arguments to method calls are not supported.
You cannot use methods with names that differ only in case.
The result-set parameter type is not allowed in either in or inout modes.
Copyright © 2005. Sybase Inc. All rights reserved. |