home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
DATABASE
/
CAR
/
CAREDIT
/
README
< prev
Wrap
Text File
|
1995-06-11
|
7KB
|
167 lines
NAME: Data Access CarEdit Sample
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 IDSConnectCanvas
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 CarBrws application.
TASK:
Construct a DLL and two applications using the Data Access Builder and the Visual Builder.
CONCEPT/FEATURE:
Use 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 using the Data Access
Builder.
PROJECT LOCATION:
Inside the Database Sample folder (inside the VisualAge C++ Samples folder).
SOURCE FILE LOCATION:
X:\ibmcpp\samples\database\car\caredit
where X: is the drive you installed the samples and document component of VisualAge C++.
HOW TO RUN THE SAMPLE PROJECT
1) In order to run this sample, you must have created the DAXSAMP database and have the CARV.DLL
(either the pre-built version or one you have built yourself) in a directory in your LIBPATH. If you have not
performed these preliminary steps, see the DAXSAMP Sample for full instructions or refer to the abbreviated
instructions below under HOW TO BUILD THIS SAMPLE.
2) If you have not already done so, start the DB2/2 database manager and log on. You can do this on
an OS/2 command line by typing:
STARTDBM
and then:
LOGON /L
This will bring up the DB2/2 logon screen. Complete the logon process.
3) The final step may be performed from either within the WorkFrame environment or from the
command line.
Within the WorkFrame environment:
Open the CAREDIT project by double-clicking on the project's icon in the CAR sample folder.
Click on the RUN button of the project's toolbar.
From the command line, inside the X:\ibmcpp\samples\database\car\caredit directory,
simply type:
CAREDIT
where X: is the drive you installed the samples and document component of VisualAge C++.
HOW TO BUILD THIS SAMPLE YOURSELF
1) If you have not already done so, build the DAXSAMP database. Building the database is the first part of
the DAXSAMP sample. Full instructions for that sample can be found in the readme file of the
ibmcpp\samples\database\daxsamp directory or inside the DAXSAMP project of the CAR Sample folder.
Abbreviated instructions are provided here for your convenience.
From within the WorkFrame environment:
- Open the DAXSAMP Sample folder in the DATABASE Samples folder. Double-click on the DAXSAMP.CMD icon.
From the command line:
- While in the ibmcpp\samples\database\car\daxsamp directory, build the database by typing:
DAXSAMP
In either case, the process will ask you what drive you wish the database to be created on,
enter a drive name (letter only, do not include a colon or backslash).
2) Start the DB2/2 database manager and logon. You can do this on an OS/2 command line by typing:
STARTDBM
and then:
LOGON /L
This will bring up the DB2/2 logon screen.
3) Start the Visual Builder.
Within the WorkFrame environment, select VISUAL from the PROJECT pulldown menu.
From the command line by typing:
ICSVB
Once in the Visual Builder, select LOAD from the FILE pulldown menu.
On the LOAD FILES screen you will see that Visual Builder has automatically
loaded the VBBase.vbb file. Select SHOW FULL FILENAMES from the OPTIONS pulldown menu to
see the pathname of that file.
From the same directory as VBBase.vbb, load VBDAX.vbb. Loading the file returns you to the main
Visual Builder screen.
Select LOAD from the FILE pulldown menu. On the LOAD FILES screen, load CarEdit.vbb from the same
directory as this README -- X:\ibmcpp\samples\database\daxsamp\car\caredit, where X: is the drive
you installed the samples and document component of VisualAge C++.
Select IMPORT PART INFORMATION from the FILE pulldown menu of the main Visual Builder screen.
On the IMPORTED FROM screen, load CarV.vbe from the X:\ibmcpp\samples\database\daxsamp directory.
Close the screen.
On the main Visual Builder screen, select CarEdit.vbb from the loaded parts files. Select all parts
in the VISUAL PARTS list. Click Mouse Button 2 on the VISUAL PARTS, select
GENERATE -> PART SOURCE from the pop-up window. Select only CarEdit in the VISUAL PARTS list.
Click Mouse Button 2 on the VISUAL PARTS list, select GENERATE -> MAIN().
Exit the Visual Builder.
4) Now build the executable file.
From within the WorkFrame environment by clicking on the Build button of the project's toolbar.
From the command line, in the X:\ibmcpp\samples\database\car\caredit directory, by typing:
BUILD
where X: is the drive you installed the samples and document component of VisualAge C++.
5) Now you can run the application.
From within the WorkFrame environment, by clicking on the Run button on the project's toolbar.
From the command line, in the X:\ibmcpp\samples\database\car\caredit directory, by typing:
CAREDIT
where X: is the drive you installed the samples and document component of VisualAge C++.
SOFTWARE/HARDWARE PREREQUISITES:
IBM VisualAge C++3.0, including the Visual
Builder and the Data Access Builder
OS/2 2.1 or Warp
DB2/2 1.2
Minimum : IBM or compatible 386
Recommended: IBM or compatible 486 and up
REQUIRED FILES:
readme Description and instructions for this sample.
build.cmd Once the CARV.DLL and application code has been
generated, will build CAREDIT.EXE.
caredit.vbb The application definition coded using the Visual
Builder.
caredit.exe The application program ready to run.