COM/MTS Guide


Appendix B . COM Samples

The Panther distribution includes some sample COM components and client screens to illustrate the procedures described in this manual. To run the samples, open the samples library in the editor. By using the editor, you can easily view the component's interface and the JPL coding used to implement the processing.

How to Install the COM Samples

How to Configure Database Access for the COM Samples

How to View the COM Samples


Description of the COM Samples

Using an ActiveX Control
Use Microsoft's treeview control to view the samples.

Calling Methods on a Client
See how a client screen calls a method on a COM component.

Implementing Methods on a Component
For the method called by the client, see how that method was implemented on the COM component.

Accessing a Database - Client
Enter a letter of the alphabet to see the restaurant names beginning with that letter. Pressing Search calls a method that fetches the data.

Accessing a Database - Component
The COM component connects to a Microsoft Access database and uses the transaction manager to fetch data.

Calling a COM Application
Enter data in the text field and choose Send Data to transfer the data to an Excel spreadsheet. Enter a cell location and choose Get Data to retrieve data from the spreadsheet. To enter data in Microsoft Excel, you must start Excel before opening the screen.

Note: If you enter data in the Excel spreadsheet, you must move the cursor to the next cell to complete the entry. Otherwise, you get an error: "Call was rejected by callee."

Calling a Panther Application

Call a Panther-built COM component from within Microsoft Excel. When you open com.xls with the macros enabled, you can go to Sheet 1 and call the cCustomers component.