Introduction
If you are developing a distributed web application that uses ActiveX controls, you can use Distributed COM (DCOM) to access them and query a particular ATK ActiveX Server. For example, the ATK grid control has a Server property with which you can specify the ActiveX server host machine. Software requirements
To complete the exercises in this chapter, you need these software resources:
In this chapter
In this chapter, you configure DCOM and test its remote connection between an ATK ActiveX grid control and an ATK ActiveX server. This chapter contains the following sample exercises:
Create an HTML Page Using the ATK Grid Control
Overview
In this exercise, you create an HTML page that contains an ActiveX grid control. Then you write a script that queries the ATK ActiveX server and loads the ATK ActiveX grid control with data. Process
To create this application, follow these steps: 1 Create an HTML page that contains an ActiveX control.
Database = c:\odi\ATK6.0\Examples\demodbs\carsdemo.db
DataView = work-table-simple
Server = PC-SERVER
where
Database is the complete path of the ObjectStore database you want to inspect, relative to the server machine.
DataView is the name of the data view you want to display inside the ATK grid control, and work-table-simple is the data view defined as an example in the carsdemo database shipped with ATK.
Server is the name of the machine where the ATK ActiveX kernel is running, such as PC-SERVER.
2 Write a script that loads the ATK grid control with data.
Write a small script that instructs the ATK grid control to load its content whenever the HTML page is loaded. Sub window_onLoad()
ATKGrid Reload
End Sub
ATKGrid exposes the Reload method, which connects the ActiveX control to the specified server and fills the control's cells with the contents of the specified data view. Internet Explorer executes the window_onLoad() procedure automatically whenever the HTML page is loaded.
3 Test the application.
If you stored this page on the PC-SERVER machine (the same specified in the Server property of the ATK grid control), you can open it from a server running on PC-SERVER. Because the page and server are on the same machine (that is, everything runs locally), there is no need to configure DCOM.
Access the Page Remotely
Overview
You can access the same HTML page that contains an ActiveX control and resides on a server, such as PC-SERVER, remotely from a client machine, such as PC-CLIENT. This exercise shows you one way to do this. Prerequisite
In order to access an HTML page from a client machine, the client must have the ATK ActiveX controls installed. This option is available in the ATK installation. Process
To create this application, follow these steps: 1 Check the DCOM configuration of the server.
You can also enter a specific client user account, or make ATK ActiveX server run as the user who is currently logged on to the server.
In this exercise, run the ATK ActiveX server using a launching user account.
2 Test the application.
Connect to the PC-SERVER ATK ActiveX server from the PC-CLIENT workstation.
Summary
In this chapter, you built an HTML page containing an ATK ActiveX control, and set up your server machine to make the ATK ActiveX server remotely accessible by means of DCOM.
Updated: 05/11/99 12:01:50