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
Wrap
Text File
|
1995-06-11
|
5KB
|
157 lines
NAME: DAXSAMP Database DLL
DESCRIPTION
This sample creates a database and a DLL to support access to that database.
(The database and DLL are used by the CarEdit and CarBrws samples.)
TASK:
Create a databse and construct a DLL using classes generated from the Data Access Builder.
CONCEPT/FEATURE:
Using the Data Access Builder to generate classes to access a database, build a
DLL to support applications that need to access data in that database.
PROJECT LOCATION:
To locate the DAXSAMP folder: open the SAMPLES folder, then the DATABASE folder, then the CAR folder.
SOURCE FILE LOCATION:
X:\ibmcpp\samples\database\car\daxsamp
where X: is the drive you installed the samples and document component
of VisualAge C++.
HOW TO USE THE SAMPLE PROJECT:
You must generate the database BEFORE you can create the DLL for this project,
and before you can run either the CarBrws or CarEdit projects.
To build the database from with the WorkFrame environment:
- Double-click on the DAXSAMP.CMD icon.
To build the database from the command line:
- While in the IBMCPP\SAMPLES\DATABASE\CAR\DAXSAMP directory, type:
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).
The second part of this sample project is the creation of a DLL to support access to the database
created in the first part, see HOW TO BUILD THE DLL YOURSELF below for instructions.
You need not complete the second part of this sample, building the DLL, in order to continue to the CarBrws
and CarEdit samples as a pre-built DLL has been provided for that purpose.
HOW TO BUILD THE DLL YOURSELF:
After building the database above, you can proceed to building the DLL either within the Workframe
environment or from the command line.
From within the WorkFrame environment:
1) Select DATABASE from the PROJECT pulldown on the menu bar to start the
Data Access Builder. Click on the CREATE CLASSES button. Select the DAXSAMP database in the
File window and click on the CONNECT button. Select USERID.CAR from the Database
window and click on the CREATE CLASSES button. Click Mouse Button 2 on the CAR icon
and select GENERATE -> PARTS from its pop-up menu. (You may get a message asking if it is
OK to overwrite existing CAR*.* files, choose YES.) Exit the Data Access Builder session.
2)After creating the database and the classes to access it, the next step is to create the DLL itself.
To do this, simply click on the Build button of the project window's toolbar.
3)The final step is to copy the newly created DLL over to a directory in your LIBPATH&colon.
COPY CARV.DLL X:\IBMCPP\DLL
where 'X:' is the drive on which you installed the samples component of VisualAge C++.
From the command line:
1)In the ibmcpp\samples\database\car\daxsamp directory, generate the parts needed to access
the DAXSAMP database by typing:
icsdata daxsamp.dax
This invokes the Data Access Builder. Choose CREATE CLASSES. Select the DAXSAMP database in
the FILE window and click on the CONNECT button. Select USERID.CAR from the
DATABASE window and click on the CREATE CLASSES button. Click Mouse Button 2 on the
car icon and select GENERATE -> PARTS from its pop-up menu. (You may get a message asking
if it is OK to overwrite existing CAR*.* files, choose yes.) Now exit the Database Access Builder session.
2)Build the DLL by typing:
build
3)The final step is to copy the newly created DLL over to a directory in your LIBPATH:
COPY CARV.DLL X:\IBMCPP\DLL
where 'X:' is the drive on which you installed the samples component of VisualAge C++.
**WARNING:**
You need not rebuild the CARV.DLL shipped with the product in order to run the CARBRWS and CAREDIT samples.
However, if you do rebuild the DLL yourself, as shown above, you MUST copy it over the one shipped with the
product or you will receive an error :hp2.-818:ehp2. when you attempt to run CARBRWS or CAREDIT.
SOFTWARE/HARDWARE PREREQUISITES:
IBM VisualAge C++3.0, including 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
SOURCE FILES - DaxSamp
README
- Description and instructions for sample.
DAXSAMP.CMD
- Creates the DAXSAMP database.
DAXSAMP.DAX
- File containing information about the DAXSAMP database mapping to the USERID.CAR table.
CARV.BND
- The bind file used to bind the classes support the USERID.CAR table in the CARV.DLL to
the DAXSAMP database.
CARV.HPP
CARV.LIB
- For linking with CARV.DLL
CARV.VBE
- Describes the Car and CarManager classes to the Visual Builder
CARV.DLL
- The support DLL for the DAXSAMP database.
BUILD.CMD
- Will build CARV.DLL once the support classes have been generated.