home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / smarts / vbdax / read.me < prev   
Encoding:
Text File  |  1996-02-23  |  4.6 KB  |  107 lines

  1. --------------------------------------------------------------------------------
  2. --
  3. -- COPYRIGHT:
  4. --   IBM WorkFrame - Project Smarts
  5. --   (C) Copyright International Business Machines Corporation 1996
  6. --   Licensed Material - Program-Property of IBM - All Rights Reserved.
  7. --   US Government Users Restricted Rights - Use, duplication, or disclosure
  8. --   restricted by GSA ADP Schedule Contract with IBM Corp.
  9. --
  10. --------------------------------------------------------------------------------
  11.  
  12.      README for Project Smarts Visual Data Access Application
  13.      ========================================================
  14.  
  15. This project uses the Data Access Builder to create access classes
  16. for your $DATABASE$ database.  It also uses the Visual Builder to
  17. create a graphical user interface that uses the data access classes
  18. to display fields from your database.
  19.  
  20. Before you build this project, you'll need to follow the steps below
  21. to complete the Visual Builder interface for your database:
  22.  
  23.  
  24.  1) Work with the Data Access DLL subproject first.  Open it by double-
  25.     clicking on the project icon from the $PROJECT_TITLE$.
  26.     Then, start the Data Access Builder tool by selecting "Database"
  27.     from the Project menu.  Create the data access parts using the
  28.     "C++ For Visual Builder" option.
  29.  
  30.  2) Double click on the created class, and select the "Automate link
  31.     to application" checkbox to simplify linking your application.
  32.     Ensure the library name is $SOURCE_FILE$.lib and the class name is
  33.     $CLASS_NAME$. Close the notebook and select generate from the
  34.     class popup to generate the code to access your datastore.
  35.  
  36.  3) Once the data access parts have been generated, close the Data Access DLL
  37.     subproject.  From now on, you'll work with the
  38.     main $PROJECT_TITLE$ project.  Now, open the
  39.     $PROJECT_TITLE$ project then start the Visual Builder
  40.     from the Project menu.
  41.  
  42.  4) From the Visual Builder's File menu, select Load to load $FILE_NAME:tolower$.vbb
  43.  
  44.  5) Repeat to load X:\IBMCPPW\IVB\VBDAX.VBB, which contains the
  45.     IDSConnectCanvasBase visual data access parts file (where X:\IBMCPPW is
  46.     the directory where you installed the VisualAge for C++ product).
  47.  
  48.  6) Select Import Part Information to import the $SOURCE_FILE$.vbe file
  49.     from the $DAX_DLL_DIR$ directory.
  50.  
  51.  7) Select $FILE_NAME:tolower$.vbb from the Loaded Part Files list.
  52.  
  53.  8) Double-click on the "sample" part from Visual Parts list
  54.     to open the part.
  55.  
  56.  9) Select Options->Add Part from the Composition Editor.
  57.  
  58. 10) Enter $CLASS_NAME$Datastore* as the part class name, then
  59.     select the Add pushbutton.
  60.  
  61. 11) Click on the non-visual part of the sample application
  62.     to add the part.
  63.  
  64. 12) From the added part popup menu (invoke with the right mouse button),
  65.     select "this", and connect it to the DSConnectCanvasBase1 datastoreBase
  66.     attribute (click on the underscored "Datastore" to select this part).
  67.  
  68. 13) Select Options->Add Part from the Composition Editor.
  69.  
  70. 14) Enter $CLASS_NAME$Manager* as the part class name, then
  71.     select the Add pushbutton to add it to the non-visual portion
  72.     of the application.
  73.  
  74. 15) Connect attribute items of the $CLASS_NAME$Manager to items
  75.     of the listbox (lower right hand corner of the application
  76.     frame window).  Double-click on the listbox to bring up the
  77.     settings page.  Change "yourClassName" to $CLASS_NAME$*, and
  78.     "yourManagerClassName::stringGenerator(" ")" to
  79.     $CLASS_NAME$Manager::stringGenerator(" ").
  80.  
  81. 16) From the added part popup menu (invoke with the right mouse button),
  82.     select "this", and connect it to the POManager1's "this" attribute.
  83.  
  84. 17) Generate the code by selecting "save and generate -> part source",
  85.     then "save and generate -> main() for part" from the File menu.
  86.  
  87. 18) Exit the Composition Editor.
  88.  
  89. 19) Build this project by selecting "Build Normal" from the project toolbar.
  90.  
  91. 20) Run the application by selecting Run from the project toolbar.
  92.  
  93.     Enter your user id and password in the appropriate fields of
  94.     the application window.  When the Disconnect button is enabled, the
  95.     connection has been established with the database.  Select
  96.     Refresh to fill the listbox with the contents of your database.
  97.  
  98.     Enter an SQL clause, and click on Select to see a subset of the
  99.     database contents based on the query.  Errors are indicated with
  100.     a message box that contains the message text from an exception.
  101.  
  102.     Select Rollback or Commit prior to disconnecting from the database.
  103.  
  104.     Select Disconnect to disconnect from the database.
  105.  
  106.  
  107.