Objective
The objective of this sample is to
demonstrate how to:
The sample database you will use must be set up before you work with the sample. See Preparation for Samples for information.
Description
This sample does the following:
Generated Data Access Classes Used by this Sample
This sample uses the following generated
classes and methods, as defined in the Data Access mapping,
minisamp.dax:
Some of the methods listed are inherited from the Data Access class library.
Running the Sample
The executable for the sample is called fill.
Since Data Access Builder generates code for three access methods
(CLI, ESQL, and ODBC), a fill executable is located in each of
three corresponding directories: db2cli, db2esql, and odbc (all
of these are subdirectories of samples\database\minisamp).
To run the sample, enter the following on the command line of the appropriate directory:
fill
If the sample fails because it could not connect to the database, enter a user ID and password that is valid for accessing the sample database, as shown:
fill userid password
The source code for the fill executables is located in the samples\database\minisamp\source directory. If you make changes to the sample's source code, you must import the sample into an IDE project and rebuild it.
The Data Access Builder
Mapping
The Data Access
samples use a complex mapping, which is provided for you in a
file called minisamp.dax. One minisamp.dax mapping file is
provided in each of the three directories: db2cli, db2esql, and
odbc. If you want to see the mapping or generate the classes for
it, import the sample into the IDE; in the Data Access Launch
view, select the part and click Edit Part.
Hints on How to Create
a Mapping for This Sample
Rather than using the mapping provided with the samples
(minisamp.dax), you can create your own mapping that will work
with this sample (but not necessarily the other samples). To
create a mapping for this sample, follow these steps:
![]()
Data
Access Builder
Data
Access Builder Workflow
Keyless
Table Support and Data Identifiers
![]()
Data Access
Class Library and Generated Class Reference
Data Access Builder
Samples
Preparation for
Samples
