home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------------------------------
- --
- -- COPYRIGHT:
- -- IBM WorkFrame - Project Smarts
- -- (C) Copyright International Business Machines Corporation 1996
- -- Licensed Material - Program-Property of IBM - All Rights Reserved.
- -- US Government Users Restricted Rights - Use, duplication, or disclosure
- -- restricted by GSA ADP Schedule Contract with IBM Corp.
- --
- --------------------------------------------------------------------------------
-
- README for Project Smarts Visual Data Access Application
- ========================================================
-
- This project uses the Data Access Builder to create access classes
- for your $DATABASE$ database. It also uses the Visual Builder to
- create a graphical user interface that uses the data access classes
- to display fields from your database.
-
- Before you build this project, you'll need to follow the steps below
- to complete the Visual Builder interface for your database:
-
-
- 1) Work with the Data Access DLL subproject first. Open it by double-
- clicking on the project icon from the $PROJECT_TITLE$.
- Then, start the Data Access Builder tool by selecting "Database"
- from the Project menu. Create the data access parts using the
- "C++ For Visual Builder" option.
-
- 2) Double click on the created class, and select the "Automate link
- to application" checkbox to simplify linking your application.
- Ensure the library name is $SOURCE_FILE$.lib and the class name is
- $CLASS_NAME$. Close the notebook and select generate from the
- class popup to generate the code to access your datastore.
-
- 3) Once the data access parts have been generated, close the Data Access DLL
- subproject. From now on, you'll work with the
- main $PROJECT_TITLE$ project. Now, open the
- $PROJECT_TITLE$ project then start the Visual Builder
- from the Project menu.
-
- 4) From the Visual Builder's File menu, select Load to load $FILE_NAME:tolower$.vbb
-
- 5) Repeat to load X:\IBMCPPW\IVB\VBDAX.VBB, which contains the
- IDSConnectCanvasBase visual data access parts file (where X:\IBMCPPW is
- the directory where you installed the VisualAge for C++ product).
-
- 6) Select Import Part Information to import the $SOURCE_FILE$.vbe file
- from the $DAX_DLL_DIR$ directory.
-
- 7) Select $FILE_NAME:tolower$.vbb from the Loaded Part Files list.
-
- 8) Double-click on the "sample" part from Visual Parts list
- to open the part.
-
- 9) Select Options->Add Part from the Composition Editor.
-
- 10) Enter $CLASS_NAME$Datastore* as the part class name, then
- select the Add pushbutton.
-
- 11) Click on the non-visual part of the sample application
- to add the part.
-
- 12) From the added part popup menu (invoke with the right mouse button),
- select "this", and connect it to the DSConnectCanvasBase1 datastoreBase
- attribute (click on the underscored "Datastore" to select this part).
-
- 13) Select Options->Add Part from the Composition Editor.
-
- 14) Enter $CLASS_NAME$Manager* as the part class name, then
- select the Add pushbutton to add it to the non-visual portion
- of the application.
-
- 15) Connect attribute items of the $CLASS_NAME$Manager to items
- of the listbox (lower right hand corner of the application
- frame window). Double-click on the listbox to bring up the
- settings page. Change "yourClassName" to $CLASS_NAME$*, and
- "yourManagerClassName::stringGenerator(" ")" to
- $CLASS_NAME$Manager::stringGenerator(" ").
-
- 16) From the added part popup menu (invoke with the right mouse button),
- select "this", and connect it to the POManager1's "this" attribute.
-
- 17) Generate the code by selecting "save and generate -> part source",
- then "save and generate -> main() for part" from the File menu.
-
- 18) Exit the Composition Editor.
-
- 19) Build this project by selecting "Build Normal" from the project toolbar.
-
- 20) Run the application by selecting Run from the project toolbar.
-
- Enter your user id and password in the appropriate fields of
- the application window. When the Disconnect button is enabled, the
- connection has been established with the database. Select
- Refresh to fill the listbox with the contents of your database.
-
- Enter an SQL clause, and click on Select to see a subset of the
- database contents based on the query. Errors are indicated with
- a message box that contains the message text from an exception.
-
- Select Rollback or Commit prior to disconnecting from the database.
-
- Select Disconnect to disconnect from the database.
-
-