home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / DATABASE / STOCK / SOM / README < prev    next >
Text File  |  1995-06-11  |  5KB  |  132 lines

  1. NAME: Data Access SOM Stock Sample
  2.  
  3. FEATURES/CONCEPTS:
  4.        This sample illustrates how to use the Data Access Builder Class Library and the code generated by the
  5.        Data Access Builder Tool to access DB2/2 database tables in a SOM C++ program. It shows how to connect
  6.        to a database, manipulate data, make transactions, and disconnect from a database.
  7.  
  8. TASK:
  9.        A simple SOM C++ program that updates stock inventory and received order information that are kept
  10.        in two DB2/2 database tables and generates a price list from it.
  11.  
  12. DESCRIPTION:
  13.        This sample program generates a price list from the initial data. It then adds more rows
  14.        to the inventory and receivedorder tables, calculates the new values and then
  15.        updates the tables. It then generates an updated price list.
  16.  
  17. PROJECT LOCATION:
  18.  
  19.       To locate the SOM folder:open the SAMPLES folder, then the DATABASE  folder, then the 
  20.       STOCK folder. 
  21.  
  22. SOURCE FILE LOCATION:
  23.  
  24.        X:\ibmcpp\samples\database\stock\som 
  25.  
  26.        where X: is the drive you installed the samples and document component of VisualAge C++.
  27.  
  28. HOW TO RUN THE SAMPLE
  29.  
  30. NOTE: You must have started the DB2/2 database manager and logged on before you can run the
  31. sample.  
  32.  
  33.   FROM THE WORKFRAME ENVIRONMENT:
  34.  
  35.   - Double-click on the DAX SOM Stock Sample icon to open the project view
  36.     of the sample. If you have not already done so, install the database -- double-click on the 
  37.     SETUPDB.CMD to install the database for the first time, otherwise double-click on RESETDB.cmd 
  38.     to re-initialize the database.  Click on the RUN button of the project's toolbar.
  39.  
  40.   FROM THE COMMAND LINE:
  41.  
  42.   - from the X:\ibmcpp\samples\database\stock\som directory, if you are installing the
  43.     database for the first time, type:
  44.  
  45.       SETUPDB.CMD
  46.  
  47.     otherwise, type:
  48.  
  49.       RESETDB.CMD
  50.  
  51.     - then type the name of the executable file&colon.
  52.  
  53.       CLIENT
  54.  
  55.  
  56. HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
  57.  
  58.     FROM THE COMMAND LINE:
  59.     Note: You must have started the DB2/2 database manager and logged on before you can build the
  60.           sample.
  61.  
  62.    1) Generate the C++ usage bindings of the IDL version of the Data Access builder C++ classes.  Change to
  63.       \ibmcpp\include directory, and type:
  64.        
  65.        sc -sxh *.idl
  66.         
  67.  
  68.    2) Change to the X:\ibmcpp\samples\database\stock\som directory.
  69.   
  70.       If you are installing the database of this sample for the first time, type:
  71.  
  72.         SETUPDB
  73.  
  74.      Otherwise, type:
  75.  
  76.         RESETDB
  77.  
  78.    3)Start the Data Access Builder by typing:
  79.  
  80.         ICSDATA BRCHTWO.DAX
  81.  
  82.      brchtwo.dax is a prebuilt file which contains the mapping between the database tables and the classes.
  83.    
  84.    4) Click Mouse Button 2 on each of the class icons (blue balls) in turn, select GENERATE ->PARTS
  85.       for each from the pop-up menu.  Close the Data Access Builder session.
  86.  
  87.    5) To build the executable, type
  88.  
  89.       NMAKE /F BINDINGS.MAK
  90.       BUILD
  91.  
  92.    6) To run the application, type:
  93.          
  94.       CLIENT
  95.  
  96.  
  97. SOFTWARE/HARDWARE PREREQUISITES:
  98.    - IBM VisualAge C++ , including Data Access Builder with SOM
  99.    - DB2/2 V1.2.0
  100.    - OS/2 2.1 or Warp
  101.    - Minimum        : IBM or compatible 386
  102.      Recommended    : IBM or compatible 486 and up
  103.  
  104.  
  105.    FILE NAME(S)     DESCRIPTION
  106.    ============     ===========
  107.    SETUPDB.CMD      This file creates the BrchTwo database and populates
  108.                     inventory and receivedorder tables.
  109.    RESETDB.CMD      This file re-initializes the two tables back to the
  110.                     initial setting (intended for use after running the
  111.                     sample application).
  112.    BUILD.CMD        This file builds the sample application.
  113.    CLIENT.CPP       The file is the client application that uses the
  114.                     Store Class.
  115.    CLIENT.CPP       The file is the client application that uses the
  116.                     Data Access Builder Class Library and the generated
  117.                     IDL classes to access the database tables.
  118.    BrchTwo.DAX      This is the saved session from the generations of the
  119.                     BrchTwo classes using the Data Access Builder Tool. It
  120.                     contains the mapping between the two database tables and
  121.                     the generated classes. User can use the mapping in this
  122.                     file to regenerate the database classes.
  123.    README           This file.
  124.    CLIENT.EXE       The application.
  125.    INVENTOV.BND     Bind files produced by SQLPREP when CLIENT.EXE was built.
  126.    PRCLISTV.BND     They are used to bind the CLIENT.EXE application to the
  127.    RECEIVEV.BND     database built with SETUPDB.CMD.
  128.    BINDINGS.MAK     Makefile to generate bindings from the generated IDL
  129.                     for use with this CPP sample application.
  130.  
  131.  
  132.