home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / DATABASE / CAR / CARBRWS / README < prev   
Text File  |  1995-06-11  |  6KB  |  170 lines

  1.  
  2.  
  3.  NAME: Data Access CarBrws Sample
  4.  
  5.   DESCRIPTION:
  6.        Construct a DLL and two applications using the  Data Access Builder and the Visual Builder. 
  7.  
  8.   CONCEPT/FEATURE:
  9.        Use the Visual Builder to construct an application to browse information in a database.  The 
  10.        application makes use of a DLL containing the  classes generated using the Data Access Builder. 
  11.  
  12.        This sample shows a simple application (a salesperson's front end to inventory in a car lot) 
  13.        to browse data in a database. The use of Data Access builder components is demonstrated, 
  14.        including use of the IDatastore settings to provide a connection to the database without 
  15.        input from the user of the application. 
  16.  
  17.  
  18.   PROJECTS LOCATION:
  19.        Inside the Database Sample folder (inside the VisualAge C++ Samples folder). 
  20.  
  21.  
  22.   SOURCE FILE LOCATION:
  23.        X:\ibmcpp\samples\database\car\carbrws 
  24.  
  25.        where X: is the drive you installed the samples and document component of VisualAge C++. 
  26.  
  27.  
  28.  HOW TO RUN THE SAMPLE PROJECT:
  29.  
  30. 1) In order to run this sample, you must have created the DAXSAMP database and have the CARV.DLL (either the
  31.     pre-built version or one you have built yourself) in a directory in your LIBPATH.  If you have not
  32.     performed these preliminary steps, see the DAXSAMP Sample for full instructions or refer to the abbreviated
  33.     instructions below under HOW TO BUILD THIS SAMPLE. 
  34.  
  35. 2) If you have not already done so, start the DB2/2 database manager and log on.  You can do this on 
  36.     an OS/2 command line by typing:
  37.  
  38.     STARTDBM
  39.  
  40.     and then:
  41.  
  42.     LOGON /L
  43.  
  44.     This will bring up the DB2/2 logon screen.  Complete the logon process.
  45.  
  46. 3) The final step may be performed from either within the WorkFrame environment or from the 
  47.     command line.
  48.  
  49.     Within the WorkFrame environment:
  50.  
  51.       Open the CARBRWS project by double-clicking on the project's icon in the CAR sample folder.
  52.       Click on the RUN button of the project's toolbar.
  53.     
  54.     From the command line, inside the X:ibmcpp\samples\database\car\carbrws directory,
  55.     simply type:
  56.  
  57.         carbrws
  58.  
  59.     where 'X:' is the drive on which you installed the samples component of VisualAge C++.
  60.  
  61.  
  62.  HOW TO BUILD THE SAMPLE PROJECT YOURSELF
  63.  
  64. 1) If you have not already done so, build the DAXSAMP database.  Building the database is the first part of 
  65.     the DAXSAMP sample.  Full instructions for that sample can be found in the readme file of the
  66.     ibmcpp\samples\database\daxsamp directory or inside the DAXSAMP project of the CAR Sample folder. 
  67.     Abbreviated instructions are provided here for your convenience.
  68.     
  69.     From within the WorkFrame environment:
  70.  
  71.     - Open the DAXSAMP Sample folder in the DATABASE Samples folder. Double-click on the DAXSAMP.CMD
  72.       icon.   
  73.  
  74.     From the command line:
  75.  
  76.     - While in the ibmcpp\samples\database\car\daxsamp directory, build the database by typing: 
  77.     
  78.        daxsamp
  79.  
  80.     In either case, the process will ask you what drive you wish the database to be created on,
  81.     enter a drive name (letter only, do not include a colon or backslash).
  82.  
  83. 2) Start the DB2/2 database manager and logon.  You can do this on an OS/2 command line by typing:
  84.      
  85.     STARTDBM
  86.  
  87.     and then:
  88.  
  89.    LOGON /L
  90.  
  91.    This will bring up the DB2/2 logon screen.
  92.  
  93. 3) Start the Visual Builder.
  94.  
  95.    Within the WorkFrame environment, select VISUAL from the PROJECT pulldown menu.
  96.  
  97.    From the command line by typing:
  98.  
  99.       icsvb
  100.  
  101. 4) Once in the Visual Builder, select LOAD from the FILE pulldown menu.
  102.  
  103.     On the LOAD FILES screen you will see that Visual Builder has automatically 
  104.     loaded the VBBase.vbb file.  Select SHOW FULL FILENAMES from the OPTIONS pulldown menu to see
  105.     the pathname of that file.  From the same directory as VBBase.vbb, load VBDAX.vbb.  Loading the file 
  106.     returns you to the main Visual Builder screen.
  107.  
  108.     Select LOAD from the FILE pulldown menu.  On the LOAD FILES screen, load CarBrws.vbb from the same 
  109.     directory as this README -- X:\ibmcpp\samples\database\daxsamp\car\carbrws.
  110.  
  111.     Select IMPORT PART INFORMATION from the FILE pulldown menu of the main Visual Builder screen.  
  112.     On the IMPORTED FROM screen, load CarV.vbe from the X:\ibmcpp\samples\database\daxsamp directory.  
  113.     Close the screen.
  114.  
  115.     On the main Visual Builder screen, select CarBrws.vbb from the loaded parts files.  Select all parts  
  116.     in the VISUAL PARTS list.  Click Mouse Button 2 on the VISUAL PARTS list, select 
  117.     GENERATE -> PART SOURCE from the pop-up window.  Select only CarBrws in the
  118.     the VISUAL PARTS List.  Click Mouse Button 2 on the VISUAL PARTS list, select GENERATE -> MAIN().
  119.  
  120.     Exit the Visual Builder.
  121.  
  122. 5) Edit CarBrws.Mak to add CarV.lib to the libraries linked with the application.
  123.  
  124. 6) Now build the executable file.
  125.  
  126.     From within the WorkFrame environment by clicking on the Build button of the project's toolbar.
  127.  
  128.     From the command line, in the X:\ibmcpp\samples\database\daxsamp\car\carbrws directory, by typing:
  129.  
  130.        build
  131.     
  132.     where 'X:' is the drive on which you installed the samples component of VisualAge C++.
  133.  
  134.  
  135. 7. Now you can run the application.
  136.  
  137.    From within the WorkFrame environment, by clicking on the Run button on the project's toolbar.
  138.  
  139.    From the command line, in the X:\ibmcpp\samples\database\daxsamp\car\carbrws 
  140.    directory, by typing:
  141.  
  142.        carbrws
  143.  
  144.    where 'X:' is the drive on which you installed the samples component of VisualAge C++.    
  145.  
  146.  
  147.  SOFTWARE/HARDWARE PREREQUISITES:
  148.          
  149.            IBM VisualAge C++3.0, including the Visual 
  150.             Builder and the Data Access Builder 
  151.            OS/2 2.1 or Warp 
  152.            DB2/2 1.2 
  153.            IBM or compatible 386 and up. 
  154.   
  155.  
  156.  
  157.  REQUIRED FILES:
  158.  
  159.   readme        Description and instruction for sample. 
  160.  
  161.   build.cmd     Will build CARBRWS.EXE once the CARV.DLL and 
  162.                     application code has been generated. 
  163.  
  164.   carbrws.vbb The application definition coded using the Visual 
  165.                     Builder. 
  166.  
  167.   carbrws.exe The application program ready to run. 
  168.   
  169.  
  170.