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:

  1. NTW or NTS with SP3.
  2. SQL Server with SP3 NT.
  3. 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)
  4. VB with SP2 or SP3.

2. Setting up the database in SQL Server

  1. Start SQL Server with SQL Service Manager.
  2. Start the SQL Enterprise Manager and register the local server if required.
  3. Open SQL Query Tool Open and execute CreateDatabase.sql script.
  4. Open and execute CreateTables.sql script

3. Setting up the virtual directory for the ASP application in the Internet Service Manager

  1. Add a new virtual directory to the default web site
  2. Name the new virtual directory 'Market' Point it to the 'WebClient' directory to use the provided HTML and ASP files provided
  3. Set the permissions for the directory to 'execute' access as well as "read" and "script"
  4. After the virtual directory has been created, right click on it to see its properties
  5. 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

  1. Open The MTS DLL project named \Server\Market.vbp.
  2. Change the server name in the connect string in the module basConstants to the name of the computer running SQL Server.
  3. Rebuild the DLL.

5. Register the DLL with the MTS Explorer

  1. Start up the MTS Explorer.
  2. Locate the MTS package for the new virtual directory for the Market application. It should be named 'IIS-{Default Web Site//Root/Market}'.
  3. 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.
  4. Change the transaction setting of CBroker to 'Requires a transaction'.
  5. Change the transaction settings for CProducts, CCustomers and COrders to 'Supports Transactions'.

6. Test the VB client application

  1. 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

  1. Run the sample web client by running http://<YourComputerName>/Market.
  2. 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.
  3. 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.