Skip Headers

Oracle Services for Microsoft Transaction Server Developer's Guide
Release 9.2 for Windows

Part Number A95496-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

4
Running the Microsoft Application Demo

This chapter describes how to use the sample Microsoft component object model (COM) application demo that is integrated with Microsoft Transaction Server.

This chapter contains these topics:

Configuring OCI with the Microsoft Application Demo

You can use the Oracle Call Interface (OCI) with the sample banking application demo that Microsoft provides with Microsoft Transaction Server. In most cases, OCI is automatically integrated with the Microsoft application demo. Review Table 4-1 to determine if OCI and the Microsoft application demo are integrated, and what you can do if they have not been integrated.

Table 4-1 Verifying OCI and Microsoft Application Demo Integration
If Microsoft Transaction Server... Then...

Is already installed when you install Oracle Services for Microsoft Transaction Server (MTS)



Oracle Universal Installer automatically backs up and substitutes several Visual C++ files of the banking demo with files that integrate the oci.dll and oramts.dll files. This enables you to use OCI with the banking demo.



Is not installed when you install Oracle Services for Microsoft Transaction Server



Perform the following procedures:

  1. Install Microsoft Transaction Server.

  2. Back up the ROOTDRIVE:\program files\mts\ samples\packages\vcacct.dll file on the Windows NT computer to a different location.

  3. Copy the vcacct.dll file in ORACLE_BASE\ORACLE_HOME\oramts\samples\account.vc\release to the Windows NT directory listed in Step 2.

Microsoft Application Demo Overview

The Microsoft application demo is installed in the ORACLE_BASE\ORACLE_HOME\oramts\samples\account.vc directory and is an OCI implementation of the Visual C++ Sample Bank package that ships with Microsoft Transaction Server. The demo component uses the user account scott and password tiger to connect to a database whose net service name is mtsdemo. You can change this information in the oramisc.h file. The demo also uses two tables:

These tables are part of the user scott schema in the default Oracle database server created during installation. See "Ensuring the Database Includes the Proper Microsoft Application Demo Tables" for more information.

Ensuring the Database Includes the Proper Microsoft Application Demo Tables

If the default database server is not being used or the database server does not include the user scott, create the tables required to run the sample banking Microsoft application demo in the relevant user's schema.

To ensure the database server includes the proper tables:

  1. Review the following table to determine if the database server includes the proper tables:



    If You Create the Database Server Through These Methods... Then...
    • Through the General Purpose, Transaction Processing, or Data Warehouse database configuration type of the Enterprise Edition, Standard Edition, or Personal Edition installation type of Oracle Universal Installer

    • Manually using a custom SQL script, and then explicitly run the scott.sql and omtssamp.sql scripts in that order against the databaseFoot 1

    • Through the following Oracle Database Configuration Assistant database configuration types:

      General Purpose

      Transaction Processing

      Data Warehouse

    The database server includes the proper tables. Go to "Running the Microsoft Application Demo".

    • Manually using a custom SQL script, and do not run omtssamp.sql against the database

    • Using the CREATE DATABASE syntax in SQL*Plus line mode

    • In any available method on Solaris or any other operating system

    The database server does not include the proper tables. Perform steps 1 through 6 in this section before proceeding to "Running the Microsoft Application Demo".

    1 If you run omtssamp.sql before running scott.sql or do not run scott.sql at all, you receive numerous error messages. Ignore these messages. The product functions properly, but the sample application demo described in this chapter does not work.

If the database server does not include the proper tables, you must create them manually.

To manually create the proper tables:

  1. Start SQL*Plus:

    C:\> sqlplus /NOLOG
    
    
  2. Connect to the database server:

    SQL> CONNECT username/password@net_service_name
    
    

    where net_service_name is the net service name that connects to the database server. If you connect to the database server with a username other than scott, you must change the username and password in oramisc.h and rebuild vcacct.dll.

  3. Create the user mtsdemousr:

    SQL> CREATE USER mtsdemousr IDENTIFIED BY mtsdemousr; 
    
    

    This creates the user mtsdemousr, which runs the Microsoft sample application.

  4. Assign the following roles to user mtsdemousr:

    SQL> GRANT CONNECT, RESOURCE TO mtsdemousr;
    
  5. Connect with user mtsdemousr:

    SQL> CONNECT mtsdemousr/mtsdemousr@net_service_name
    
    
  6. Run the following SQL script:

    SQL> @\ORACLE_BASE\ORACLE_HOME\oramts\samples\sql\omtssamp.sql
    
    

    This creates the account and receipt tables in the schema of user mtsdemousr.

Running the Microsoft Application Demo

This section describes how to run the Microsoft application demo.

To run the Microsoft application demo:


Note:

The sample project was created using Visual C++ 5.0. To build the project using Visual C++ 6.0, the Microsoft .idl file must be processed with the new release of the MIDL compiler included with Visual C++ 6.0:

  1. Go to the directory ORACLE_BASE\ORACLE_HOME\oramts\samples\account.vc.

  2. Enter the following at the command prompt:

    midl account.idl

When opening a Visual C++ 5.0 project, Visual C++ 6.0 automatically updates it to the new release.


  1. Ensure that you have installed the Sample Bank Client application shipped with Microsoft Transaction Server. The sample component DLLs are typically installed under ROOTDRIVE:\program files\mts\samples\packages. You can also verify installation through the Control Panel:

    1. Choose Start > Settings > Control Panel.

    2. Double-click Add/Remove Programs.

      The Add/Remove Programs Properties dialog box appears.

    3. Select Windows NT 4.0 Option Pack and click Add/Remove.

      The setup takes several seconds to initialize. When complete, the Microsoft Windows NT 4.0 Option Pack Setup dialog box appears.

    4. Click Next.

    5. Click Add/Remove.

    6. Scroll through the list until you find Transaction Server.

    7. Double-click Transaction Server.

    8. Ensure that the Transaction Server Development subcomponent check box is selected; this indicates that the demo is installed. If this subcomponent is not selected, then select it and follow Steps 1i through 1m. Otherwise, go to Step 2.

    9. Click OK.

    10. Click Next on the Microsoft Windows NT 4.0 Option Pack Setup dialog box.

      Installation takes several seconds.

    11. Exit the Add/Remove Programs Properties dialog box.

    12. Exit the Control Panel.

    13. Go to step 2.
  2. Open the project account.dsp in the ORACLE_BASE\ORACLE_HOME\oramts\samples\account.vc directory using Microsoft Developer Studio.

  3. Build vcacct.dll.

  4. Back up the file vcacct.dll installed under ROOTDRIVE:\program files\mts\samples\packages.

  5. Overwrite vcacct.dll with the one you built in step 3.

  6. Choose Start > Programs > Windows NT 4.0 Option Pack > Microsoft Transaction Server > Bank Client.

    This starts the Sample Visual Basic bank application and runs vbbank.exe to test the component.

  7. Click the Visual C++ radio button of the Language field.

  8. Click the Account or the MoveMoney radio boxes under the Component field.

  9. Enter the account number(s) and the amount for the operation.

  10. Click Submit.

  11. Start SQL*Plus:

    C:\> sqlplus /NOLOG
    
    
  12. Connect with the username scott and password tiger (unless you changed it):

    SQL> CONNECT scott/tiger
    
    
  13. Verify the success of the operation:

    SQL> SELECT * FROM account; 
    SQL> SELECT * FROM receipt; 
    

Configuring Oracle ODBC Driver with the Microsoft Application Demo

You can use Oracle Open Database Connectivity (ODBC) Driver release 9.2 with the Microsoft sample application. See "Using the Oracle ODBC Driver" for instructions on integrating the Oracle ODBC Driver with the sample application.

Configuring Oracle Provider for OLE DB with the Microsoft Application Demo

You can use Oracle Provider for OLE DB release 9.2 with the Microsoft sample application. See the Oracle Provider for OLE DB Developer's Guide for information about using Oracle Provider for OLE DB with Microsoft Transaction Server.


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback