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

  1.  
  2.  
  3. NAME: DAXSAMP Database DLL
  4.  
  5.  
  6. DESCRIPTION
  7.  
  8. This sample creates a database and a DLL to support access to that database.
  9. (The database and DLL are used by the CarEdit and CarBrws samples.) 
  10.   
  11.  
  12. TASK:
  13.  
  14. Create a databse and construct a DLL using classes generated from the Data Access Builder.
  15.  
  16.  
  17. CONCEPT/FEATURE:
  18. Using the Data Access Builder to generate classes to access a database, build a
  19. DLL to support applications that need to access data in that database.
  20.  
  21.  
  22. PROJECT LOCATION:
  23.  
  24. To locate the DAXSAMP folder: open the SAMPLES folder, then the DATABASE folder, then the CAR folder. 
  25.  
  26.  
  27. SOURCE FILE LOCATION:
  28.  
  29. X:\ibmcpp\samples\database\car\daxsamp 
  30.  
  31. where X: is the drive you installed the samples and document component
  32. of VisualAge C++.
  33.  
  34.  
  35. HOW TO USE THE SAMPLE PROJECT:
  36.  
  37. You must generate the database BEFORE you can create the DLL for this project,
  38. and before you can run either the CarBrws or CarEdit projects.  
  39.  
  40. To build the database from with the WorkFrame environment:
  41.  - Double-click on the DAXSAMP.CMD icon.   
  42.  
  43. To build the database from the command line:
  44. - While in the IBMCPP\SAMPLES\DATABASE\CAR\DAXSAMP directory, type: 
  45.  
  46.    DAXSAMP
  47.  
  48. In either case, the process will ask you what drive you wish the database to be created on, 
  49. enter a drive name (letter only, do not include a colon or backslash).
  50.  
  51. The second part of this sample project is the creation of a DLL to support access to the database
  52. created in the first part, see HOW TO BUILD THE DLL YOURSELF below for instructions.  
  53. You need not complete the second part of this sample, building the DLL, in order to continue to the CarBrws
  54. and CarEdit samples as a pre-built DLL has been provided for that purpose. 
  55.  
  56.  
  57. HOW TO BUILD THE DLL YOURSELF:
  58.  
  59. After building the database above, you can proceed to building the DLL either within the Workframe
  60. environment or from the command line.
  61.  
  62. From within the WorkFrame environment:
  63.  
  64. 1) Select DATABASE from the PROJECT pulldown on the menu bar to start the 
  65. Data Access Builder.  Click on the CREATE CLASSES button.   Select the DAXSAMP database in the
  66. File window and click on the CONNECT button.  Select USERID.CAR from the Database
  67. window and click on the CREATE CLASSES button.  Click Mouse Button 2 on the CAR icon
  68. and select GENERATE -> PARTS from its pop-up menu.  (You may get a message asking if it is 
  69. OK to overwrite existing CAR*.* files, choose YES.)  Exit the Data Access Builder session.
  70.  
  71. 2)After creating the database and the classes to access it, the next step is to create the DLL itself.
  72. To do this, simply click on the Build button of the project window's toolbar. 
  73.  
  74. 3)The final step is to copy the newly created DLL over to a directory in your LIBPATH&colon.
  75.  
  76.   COPY CARV.DLL X:\IBMCPP\DLL
  77.  
  78. where 'X:' is the drive on which you installed the samples component of VisualAge C++.
  79.  
  80.  
  81.  
  82. From the command line:
  83.  
  84. 1)In the ibmcpp\samples\database\car\daxsamp  directory, generate the parts needed to access
  85. the DAXSAMP database by typing:
  86.  
  87.   icsdata daxsamp.dax
  88.  
  89. This invokes the Data Access Builder.  Choose CREATE CLASSES.  Select the DAXSAMP database in 
  90. the FILE window and click on the CONNECT button.  Select USERID.CAR from the 
  91. DATABASE window and click on the CREATE CLASSES button.  Click Mouse Button 2 on the 
  92. car icon and select GENERATE -> PARTS from its pop-up menu.  (You may get a message asking 
  93. if it is OK to overwrite existing CAR*.* files, choose yes.)  Now exit the Database Access Builder session.
  94.  
  95. 2)Build the DLL by typing:
  96.   
  97.   build
  98.  
  99. 3)The final step is to copy the newly created DLL over to a directory in your LIBPATH:
  100.  
  101.  COPY CARV.DLL X:\IBMCPP\DLL
  102.  
  103. where 'X:' is the drive on which you installed the samples component of VisualAge C++.
  104.  
  105.  
  106.  
  107.  
  108.                                                       **WARNING:**
  109.  
  110. You need not rebuild the CARV.DLL shipped with the product in order to run the CARBRWS and CAREDIT samples.
  111. However, if you do rebuild the DLL yourself, as shown above, you MUST copy it over the one shipped with the 
  112. product or you will receive an error :hp2.-818:ehp2. when you attempt to run CARBRWS or CAREDIT.
  113.  
  114.  
  115.  
  116.  
  117. SOFTWARE/HARDWARE PREREQUISITES:
  118.  
  119.   IBM VisualAge C++3.0, including the Data Access Builder
  120.   OS/2 2.1 or Warp
  121.   DB2/2 1.2
  122.  
  123.   Minimum     : IBM or compatible 386 
  124.   Recommended : IBM or compatible 486 and up
  125.  
  126.  
  127. SOURCE FILES - DaxSamp
  128.  
  129.   README
  130.   - Description and instructions for sample.
  131.  
  132.   DAXSAMP.CMD
  133.   - Creates the DAXSAMP database.
  134.  
  135.   DAXSAMP.DAX
  136.   - File containing information about the DAXSAMP database mapping to the USERID.CAR table.
  137.  
  138.   CARV.BND
  139.   - The bind file used to bind the classes support the USERID.CAR table in the CARV.DLL to 
  140.     the DAXSAMP database.
  141.  
  142.   CARV.HPP
  143.  
  144.   CARV.LIB
  145.   - For linking with CARV.DLL 
  146.  
  147.   CARV.VBE
  148.   - Describes the Car and CarManager classes to the Visual Builder
  149.  
  150.   CARV.DLL
  151.   - The support DLL for the DAXSAMP database.
  152.  
  153.   BUILD.CMD
  154.   - Will build CARV.DLL once the support classes have been generated.
  155.  
  156.       
  157.