Oracle® Services for Microsoft Transaction Server Developer's Guide 10g Release 1 (10.1) for Windows Part Number B10114-01 |
|
|
View PDF |
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 Oracle ODBC Driver with the Microsoft Application Demo
Configuring Oracle Provider for OLE DB with the Microsoft Application Demo
Note: The Microsoft application demo is not included with Microsoft Transaction Server on Windows 2000, Windows XP, or Windows Server 2003. |
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 (OraMTS) | 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:
|
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:
account
receipt
These tables are part of the user scott
schema in the default Oracle database created during installation.
See Also:
|
If the default database is not being used or the database 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 includes the proper tables:
Review the following table to determine if the database includes the proper tables:
If You Create the Database Through These Methods... | Then... |
---|---|
Note: If you run |
The database includes the proper tables. Go to "Running the Microsoft Application Demo". |
The database does not include the proper tables. Perform steps 0 through 6 in this section before proceeding to "Running the Microsoft Application Demo". |
If the database does not include the proper tables, you must create them manually.
To manually create the proper tables:
Start SQL*Plus:
C:\> sqlplus /NOLOG
Connect to the database:
SQL> CONNECT username/password@net_service_name
where net_service_name
is the net service name that connects to the database. If you connect to the database with a username other than scott
, you must change the username and password in oramisc.h
and rebuild vcacct.dll
.
Create the user mtsdemousr
:
SQL> CREATE USER mtsdemousr IDENTIFIED BY mtsdemousr;
This creates the user mtsdemousr
, which runs the Microsoft sample application.
Assign the following roles to user mtsdemousr
:
SQL> GRANT CONNECT,RESOURCE TO mtsdemousr;
Connect with user mtsdemousr
:
SQL> CONNECT mtsdemousr/mtsdemousr@net_service_name
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
.
This section describes how to run the Microsoft application demo.
To run the Microsoft application demo:
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
.
Open the project account.dsp
in the ORACLE_BASE\ORACLE_HOME
\oramts\SAMPLES\account.vc\Release
directory using Microsoft Developer Studio.
Back up the file vcacct.dll
installed under ROOTDRIVE
:\program files\mts\samples\packages
.
Overwrite vcacct.dll
with the one you built in step 3.
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.
Click the Visual C++ radio button of the Language field.
Click the Account or the MoveMoney radio boxes under the Component field.
Enter the account numbers and the amount for the operation.
Click Submit.
Start SQL*Plus:
C:\> sqlplus /NOLOG
Connect with the username scott
and the password tiger (unless you changed it):
SQL> CONNECT scott/tiger
Verify the success of the operation:
SQL> SELECT * FROM account; SQL> SELECT * FROM receipt;
You can use Oracle Open Database Connectivity (ODBC) Driver 10g release 1 (10.1) with the Microsoft sample application.
See Also: "Using Oracle ODBC Driver" for instructions on integrating the Oracle ODBC Driver with the sample application. |
You can use Oracle Provider for OLE DB 10g release 1 (10.1) with the Microsoft sample application.
See Also: Oracle Provider for OLE DB Developer's Guide for information about using Oracle Provider for OLE DB with Microsoft Transaction Server |