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
Wrap
Text File
|
1995-06-11
|
6KB
|
170 lines
NAME: Data Access CarBrws Sample
DESCRIPTION:
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 information in a database. The
application makes use of a DLL containing the classes generated using the Data Access Builder.
This sample shows a simple application (a salesperson's front end to inventory in a car lot)
to browse data in a database. The use of Data Access builder components is demonstrated,
including use of the IDatastore settings to provide a connection to the database without
input from the user of the application.
PROJECTS LOCATION:
Inside the Database Sample folder (inside the VisualAge C++ Samples folder).
SOURCE FILE LOCATION:
X:\ibmcpp\samples\database\car\carbrws
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 CARBRWS 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\carbrws directory,
simply type:
carbrws
where 'X:' is the drive on which you installed the samples component of VisualAge C++.
HOW TO BUILD THE SAMPLE PROJECT 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
4) 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 CarBrws.vbb from the same
directory as this README -- X:\ibmcpp\samples\database\daxsamp\car\carbrws.
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 CarBrws.vbb from the loaded parts files. Select all parts
in the VISUAL PARTS list. Click Mouse Button 2 on the VISUAL PARTS list, select
GENERATE -> PART SOURCE from the pop-up window. Select only CarBrws in the
the VISUAL PARTS List. Click Mouse Button 2 on the VISUAL PARTS list, select GENERATE -> MAIN().
Exit the Visual Builder.
5) Edit CarBrws.Mak to add CarV.lib to the libraries linked with the application.
6) 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\daxsamp\car\carbrws directory, by typing:
build
where 'X:' is the drive on which you installed the samples component of VisualAge C++.
7. 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\daxsamp\car\carbrws
directory, by typing:
carbrws
where 'X:' is the drive on which you installed the samples 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
IBM or compatible 386 and up.
REQUIRED FILES:
readme Description and instruction for sample.
build.cmd Will build CARBRWS.EXE once the CARV.DLL and
application code has been generated.
carbrws.vbb The application definition coded using the Visual
Builder.
carbrws.exe The application program ready to run.