Market Application Setup
Sample application for MIND article on MTS/ASP
integration
Article and sample application
written by Ted Pattison (tedp@develop.com)
1. Before you begin you need the have the following things
installed:
- NTW or NTS with SP3.
- SQL Server with SP3 NT.
- NT Option Pack with MTS 2.0 and IIS 4.0.
(note: if you install SQL Server after MTS 2.0 you
should reinstall the option pack)
- VB with SP2 or SP3.
2. Setting up the database in SQL Server
- Start SQL Server with SQL Service Manager.
- Start the SQL Enterprise Manager and register the local
server if required.
- Open SQL Query Tool Open and execute CreateDatabase.sql
script.
- Open and execute CreateTables.sql script
3. Setting up the virtual directory for the ASP application
in the Internet Service Manager
- Add a new virtual directory to the default web site
- Name the new virtual directory 'Market' Point it to the
'WebClient' directory to use the provided HTML and ASP
files provided
- Set the permissions for the directory to 'execute' access
as well as "read" and "script"
- After the virtual directory has been created, right click
on it to see its properties
- Select the option to "Run in seperate memory
space" to isolate your application in its
own process
4. Rebuld the MTS DLL with the correct connection information
- Open The MTS DLL project named \Server\Market.vbp.
- Change the server name in the connect string in the
module basConstants to the name of the
computer running SQL Server.
- Rebuild the DLL.
5. Register the DLL with the MTS Explorer
- Start up the MTS Explorer.
- Locate the MTS package for the new virtual directory for
the Market application. It should be named 'IIS-{Default
Web Site//Root/Market}'.
- Drag and drop your DLL file onto this package's component
view. After you have done this your should see the
components from the DLL in the MTS Explorer.
- Change the transaction setting of CBroker to 'Requires
a transaction'.
- Change the transaction settings for CProducts, CCustomers
and COrders to 'Supports Transactions'.
6. Test the VB client application
- Run the client application Client\MarketClient.exe.
It should allow you to run sales transactions. This is a
typical COM client application written with VB. This type
of client applications usually runs in a LAN environment.
7. Test the application through the web site
- Run the sample web client by running http://<YourComputerName>/Market.
- Follow the steps to complete a few transactions. You must
pass the name of a customer. You can use the name of your
SQL Server computer as a customer in this application.
- Look at the ASP code in OrderEntry.asp. You can change it
to call either SubmitOrdr1.asp or SubmitOrder2.asp. Look
at the code in both of these files. Both these examples
are described in the article.