Set connection properties

Before calling the Initialize method, set the connection properties, such as UserName, Password, Host, and Name. The ActiveX client uses connection properties to connect to the server. This example sets the connection information for the employeeproxy object.

employeeproxy.UserName = "Guest"
employeeproxy.Password = "Guest"
employeeproxy.Host = "Jaguar"
employeeproxy.Name = "Company/Employee"

The user name and password, which must be specified, are required for login authentication and access control. The defaults for user name and password are empty strings. If the server administrator has enabled authentication, you must use a valid user name and password. If user access to the package or component is limited, the user name must be in a group that has access to the component. For more information on security, see Chapter 2, “Securing Component Access,” in the EAServer Security Administration and Programming Guide.

The Host property, which is optional, is the machine name and IIOP port number or the environment variable that specifies the machine name and IIOP port number. If the machine name and IIOP port number are specified for the Host property, the environment variable is ignored. See “Deploy the ActiveX client” for more information about defining the environment variable.

The syntax for specifying the machine name and IIOP port number is:

"machine:port"

where:

machine is the machine name.

port is the IIOP port number.

NoteIf the Host property or environment variable is not specified, or defined incorrectly, the default, which is “localhost:9000”, is used.

The Name property, which is optional, specifies the package and component names. By default, the package name is the same as the module name, and the component name is the same as the interface name. Specify the Name property when a component’s package or component name is different from its module or interface name. The package and component are automatically located relative to the server’s Initial Context property. The syntax for the Name property is:

"package/component"

where: