IBM Books

Quick Beginnings for DB2 Connect Enterprise Edition


Testing DB2 With The MTS "BANK" Sample Application

Follow these steps:

  1. Change the file \Program Files\Common Files\ODBC\Data Sources\ MTSSamples.dsn so that it looks like this:
        [ODBC]    DRIVER=IBM DB2 ODBC DRIVER     UID=your_user_id    PWD=your_password
       DSN=your_database_alias    Description=MTS Samples
    

    where:

  2. Go to ODBC Admin in the Control Panel, click on System DSN tab and add the data source:

    1. Choose IBM ODBC Driver and click on Finish.

    2. When presented with the list of database alias, choose the one that was specified previously.

    3. When asked if you want to CONNECT, respond NO as there is an outstanding problem if you respond YES (ODBC Admin will hang and you must use Task Manager to kill runn32dl process or reboot).

    4. Click on OK.

  3. Use DB2 CLP to connect to a DB2 database under the ID your_user_id, as above. A number of utilities will be bound automatically (for DB2 for OS/390, the bind files in ddcsmvs.lst will be bound automatically).

    Then create the sample table and data for the MTS sample application as follows:

     CREATE TABLE ACCOUNT (ACCOUNTNO INT, BALANCE INT)
     INSERT INTO ACCOUNT VALUES (1, 1)
    

  4. On the client, make sure that the DBM Configuration Parameter TP_MON_NAME is set to the string MTS.

  5. Run the bank application: Select the Account option and the Visual C++ or Visual Basic option and then click on Submit to execute. Other options may use server-specific SQL that will not work.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]