
 **********************************************************************
 * DISCLAIMER OF WARRANTIES:                                          *
 *                                                                    *
 * The following enclosed code is sample code created by IBM          *
 * Corporation.  This sample code is not part of any standard IBM     *
 * product and is provided to you solely for the purpose of assisting *
 * you in the development of your applications.  The code is provided *
 * "AS IS", without warranty of any kind.  IBM shall not be liable    *
 * for any damages arising out of your use of the sample code, even   *
 * if they have been advised of the possibility of such damages       *
 *                                                                    *
 **********************************************************************

NAME:  Data Access CarBrws Sample
---------------------------------

FEATURES/CONCEPTS :

   Using the Visual Builder to construct an application that browses
   information in a supplied dBase database named DAXSAMP.
   The application makes use of a DLL containing the classes
   generated by the Data Access Builder.

   This sample creates a simple application (a salesperson's front end to
   a car lot inventory) to browse data in a database.
   The use of Data Access Builder components is demonstrated,
   including the use of IDatastoreBase settings to provide a connection
   to the database without input from the user of the application.

DESCRIPTION

   This sample uses a DLL and an application which has been constructed
   using Data Access Builder and the Visual Builder.

   NOTE:  You may run the sample without rebuilding the sample.
          If you wish to rebuild the sample before running, follow the
          instructions below.

PROJECT/SOURCE FILE LOCATION

   X:\IBMCPPW\SAMPLES\DATABASE\CAR\CARBRWS

   where X: is the drive on which you installed the samples and document
   component of VisualAge C++.

HOW TO BUILD THE SAMPLE:

  If you have not already done so, build the access DLL used by this
  application. Please refer to the readme in
  x:\ibmcppw\samples\database\car\daxsamp for a description on how to rebuild
  the access DLL.

  NOTE: If you are using workframe to rebuild the access DLL. You should bring
        up the carbrws workframe project by typing

             iwf carbrws

        You may then invoke the DAXSAMP child project by double-clicking on the
        DAXSAMP project.

        From this point, follow the instructions for rebuilding the access DLL
        from within workframe in the x:\ibmcppw\samples\database\car\daxsamp
        readme.


  After optionally rebuilding the access DLL, you may optionally rebuild
  carbrws.exe.

  To rebuild carbrws.exe use the following instructions:


REBUILDING THE SAMPLE:

   1. Change directories to x:\ibmcppw\samples\database\car\carbrws.

      To rebuild the sample from the command line, start the Visual Builder
      from the x:\ibmcppw\samples\database\car\carbrws directory by typing

          IVB

      If you are using workframe, first invoke the Workframe project by typing

         IWF Carbrws

      Then select VISUAL from the Project menu item.

   2. Select LOAD from the FILE pull-down menu.
      Load CARBRWS.VBB from (X:\IBMCPPW\SAMPLES\DATABASE\CAR\CARBRWS).

   3. Select SHOW FULL FILENAMES from the OPTIONS pulldown menu to see
      the pathname of the VBBASE.VBB file. This file is automatically
      loaded by the Visual Builder.

   4. Select LOAD from the FILE pull-down menu.

   5. Load VBDAX.VBB from the directory that contains VBBASE.VBB.
      Loading this file returns you to the main Visual Builder screen.

   7. Select IMPORT PART INFORMATION from the FILE pull-down menu of the
      main Visual Builder screen.
      Import CAR.VBE from the X:\IBMCPPW\SAMPLES\DATABASE\CAR\DAXSAMP directory.
      Close the screen.

   8. On the main Visual Builder screen, select CARBRWS.VBB and VBDAX.VBB from
      the loaded parts files.
      Select CarBrws in the VISUAL PARTS list.
      Click mouse button 2 on the VISUAL PARTS list.
      Select GENERATE -> PART SOURCE from the pop-up window.
      Select CarBrws in the the VISUAL PARTS List.
      Click mouse button 2 on the VISUAL PARTS list.
      Select GENERATE -> MAIN() FOR PART from the pop-up window.

   9. Exit the Visual Builder.

  10. To build the sample from the command line, first copy car.lib and car.hpp
      from x:\ibmcppw\samples\database\car\daxsamp by typing

         copy ..\daxsamp\car.lib
         copy ..\daxsamp\car.hpp

      then type

         nmake.

      To rebuild the sample using Workframe select BUILD normal from the
      PROJECT menu item.

HOW TO RUN THE SAMPLE:

      Before running the application from the command line first copy
      car.dll from x:\ibmcppw\samples\database\car\daxsamp to
      x:\ibmcppw\samples\database\car\carbrws or to another directory
      on your path.

      You may reset to contents of the database. To reset the contents from
      the command line type

        RESETTBO


    - NOTE: If you are accessing a remote server, you may be required to supply
            a userid and password. They may be passed to RESETTBO and CLIENT.
            If you are using CLI use RESETTBC and if you are using Embedded SQL
            use RESETTBE.

      To invoke the application from the command line type

         Carbrws

      To invoke the application from workframe, choose the RUN option
      from the PROJECT menu item.


FILE NAME(S)     DESCRIPTION
============     ===========
RESETTBO.BAT     This file resets the Car table to its intial state.
                 Use this file when using ODBC.
RESETTBC.BAT     This file resets the Car table to its inital state.
                 Use this file when using CLI.
RESETTBE.BAT     This file resets the Car table to its intial state.
                 Use this file when using Embedded SQL.
MAKEFILE         This is the makefile used to build the sample application from
                 the command line.
CARBRWS.EXE      This is the executable.
CRTDB.BAT        This file creates a local DB2 database called DAXSAMP.
                 You must run RESETTBE after creating the local DB2 database
                 to create and poplulate the database tables.
                 NOTE: If you are accessing a remote DB2 server, the database
                       must be created on the remote server and cataloged on
                       the local client.
CARBRWS.IWP      This file is used to invoke the workframe project associated
                 with this sample.
CARBRWS.IWO      This file is used to store the options associated with the
                 workframe project.
DAXSAMP.IWP      This file is the workframe child project used to recreate the
                 Database access DLL.
DAXSAMP.IWO      This file is used to invoke the workframe project associated
                 with this sample.
CARBRWS.VBB      This file is used when rebuilding the Carbrws application.
README.TXT       This file.
