

**********************************************************************
* 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 CarEdit Sample
---------------------------------

FEATURES/CONCEPTS :

   Using the Visual Builder to construct an application to browse and
   modify information in a database.  The application makes use of a DLL
   containing the classes generated by the Data Access Builder.

DESCRIPTION

   This sample shows an application that might be used as a salesmanager's
   front end to inventory in a car lot.  The use of Data Access Builder
   components is demonstrated, including use of the IDSConnectCanvasBase to
   build a multiframe application.  The user of the application would be given
   the ability to connect to different databases, examine, modify, add or
   delete the database representations of cars in the lot inventory.
   CarEdit would be used by the salesmanager to maintain the information
   available to the salespersons using the CarEdit application.

   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\CAREDIT

   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 caredit workframe project by typing

             iwf caredit

        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
  caredit.exe.

  To rebuild caredit.exe use the following instructions:


REBUILDING THE SAMPLE:

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

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

          IVB

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

         IWF Caredit

      Then select VISUAL from the Project menu item.

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

   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 CAREDIT.VBB and VBDAX.VBB from
      the loaded parts files.
      Select CarEdit, CarContainer, and ModifyCar in the VISUAL PARTS list.
      Click mouse button 2 on the VISUAL PARTS list.
      Select GENERATE -> PART SOURCE from the pop-up window.
      Select CarEdit 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.

BEFORE RUNNING 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\caredit or to another directory
      on your path.

      If you have run the sample before and made changes to the database,
      you may choose to work with the database in its original or updated state.

      To work with the original database do the following.

      From the command line type

        RESETTBO

      From Workframe, double click on RESETTBO.BAT.

RUNNING THE SAMPLE:

      To invoke the application from the command line type

         Caredit

      From Workframe choose the RUN option from the PROJECT menu item.

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.

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.
CAREDIT.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.
CAREDIT.IWP      This file is used to invoke the workframe project associated
                 with this sample.
CAREDIT.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.
CAREDIT.VBB      This file is used when rebuilding the CarEdit application.
README.TXT       This file.
